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

12 lines
228 B
TypeScript
Raw Normal View History

//@target: ES6
class C {
get [Symbol.hasInstance]() {
return "";
}
// Should take a string
set [Symbol.hasInstance](x: number) {
}
}
(new C)[Symbol.hasInstance] = 0;
(new C)[Symbol.hasInstance] = "";