mirror of
https://github.com/swc-project/swc.git
synced 2024-12-20 12:12:16 +03:00
12 lines
228 B
TypeScript
12 lines
228 B
TypeScript
|
//@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] = "";
|