swc/crates/swc_ecma_parser/tests/tsc/thisPropertyAssignmentCircular.ts

23 lines
397 B
TypeScript
Raw Normal View History

// @allowJs: true
// @checkJs: true
// @declaration: true
// @emitDeclarationOnly: true
// @filename: thisPropertyAssignmentCircular.js
export class Foo {
constructor() {
this.foo = "Hello";
}
slicey() {
this.foo = this.foo.slice();
}
m() {
this.foo
}
}
/** @class */
function C() {
this.x = 0;
this.x = function() { this.x.toString(); }
}