TypeScript/tests/baselines/reference/symbolProperty47.types
Andy a299d2dd1c
isDeclarationName: support ComputedPropertyName (#22123)
* isDeclarationName: support ComputedPropertyName

* update additional baseline
2018-02-22 15:53:49 -08:00

46 lines
977 B
Plaintext

=== tests/cases/conformance/es6/Symbols/symbolProperty47.ts ===
class C {
>C : C
get [Symbol.hasInstance]() {
>[Symbol.hasInstance] : number
>Symbol.hasInstance : symbol
>Symbol : SymbolConstructor
>hasInstance : symbol
return "";
>"" : ""
}
// Should take a string
set [Symbol.hasInstance](x: number) {
>[Symbol.hasInstance] : number
>Symbol.hasInstance : symbol
>Symbol : SymbolConstructor
>hasInstance : symbol
>x : number
}
}
(new C)[Symbol.hasInstance] = 0;
>(new C)[Symbol.hasInstance] = 0 : 0
>(new C)[Symbol.hasInstance] : number
>(new C) : C
>new C : C
>C : typeof C
>Symbol.hasInstance : symbol
>Symbol : SymbolConstructor
>hasInstance : symbol
>0 : 0
(new C)[Symbol.hasInstance] = "";
>(new C)[Symbol.hasInstance] = "" : ""
>(new C)[Symbol.hasInstance] : number
>(new C) : C
>new C : C
>C : typeof C
>Symbol.hasInstance : symbol
>Symbol : SymbolConstructor
>hasInstance : symbol
>"" : ""