21 lines
509 B
Text
21 lines
509 B
Text
=== tests/cases/conformance/es6/Symbols/symbolProperty57.ts ===
|
|
var obj = {
|
|
>obj : { [Symbol.iterator]: number; }
|
|
>{ [Symbol.iterator]: 0} : { [Symbol.iterator]: number; }
|
|
|
|
[Symbol.iterator]: 0
|
|
>Symbol.iterator : symbol
|
|
>Symbol : SymbolConstructor
|
|
>iterator : symbol
|
|
>0 : number
|
|
|
|
};
|
|
|
|
// Should give type 'any'.
|
|
obj[Symbol["nonsense"]];
|
|
>obj[Symbol["nonsense"]] : any
|
|
>obj : { [Symbol.iterator]: number; }
|
|
>Symbol["nonsense"] : any
|
|
>Symbol : SymbolConstructor
|
|
>"nonsense" : string
|
|
|