TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty46.ts
2015-02-06 21:31:54 -08:00

12 lines
231 B
TypeScript

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