50 lines
3 KiB
Text
50 lines
3 KiB
Text
=== tests/cases/conformance/es6/Symbols/symbolProperty18.ts ===
|
|
var i = {
|
|
>i : { [Symbol.iterator]: number; [Symbol.toStringTag](): string; [Symbol.toPrimitive]: boolean; }, Symbol(i,Decl(symbolProperty18.ts,0,3))
|
|
>{ [Symbol.iterator]: 0, [Symbol.toStringTag]() { return "" }, set [Symbol.toPrimitive](p: boolean) { }} : { [Symbol.iterator]: number; [Symbol.toStringTag](): string; [Symbol.toPrimitive]: boolean; }
|
|
|
|
[Symbol.iterator]: 0,
|
|
>Symbol.iterator : symbol, Symbol(SymbolConstructor.iterator,Decl(lib.d.ts,1236,31))
|
|
>Symbol : SymbolConstructor, Symbol(Symbol,Decl(lib.d.ts,1186,52),Decl(lib.d.ts,1262,11))
|
|
>iterator : symbol, Symbol(SymbolConstructor.iterator,Decl(lib.d.ts,1236,31))
|
|
>0 : number
|
|
|
|
[Symbol.toStringTag]() { return "" },
|
|
>Symbol.toStringTag : symbol, Symbol(SymbolConstructor.toStringTag,Decl(lib.d.ts,1248,24))
|
|
>Symbol : SymbolConstructor, Symbol(Symbol,Decl(lib.d.ts,1186,52),Decl(lib.d.ts,1262,11))
|
|
>toStringTag : symbol, Symbol(SymbolConstructor.toStringTag,Decl(lib.d.ts,1248,24))
|
|
>"" : string
|
|
|
|
set [Symbol.toPrimitive](p: boolean) { }
|
|
>Symbol.toPrimitive : symbol, Symbol(SymbolConstructor.toPrimitive,Decl(lib.d.ts,1242,21))
|
|
>Symbol : SymbolConstructor, Symbol(Symbol,Decl(lib.d.ts,1186,52),Decl(lib.d.ts,1262,11))
|
|
>toPrimitive : symbol, Symbol(SymbolConstructor.toPrimitive,Decl(lib.d.ts,1242,21))
|
|
>p : boolean, Symbol(p,Decl(symbolProperty18.ts,3,29))
|
|
}
|
|
|
|
var it = i[Symbol.iterator];
|
|
>it : number, Symbol(it,Decl(symbolProperty18.ts,6,3))
|
|
>i[Symbol.iterator] : number
|
|
>i : { [Symbol.iterator]: number; [Symbol.toStringTag](): string; [Symbol.toPrimitive]: boolean; }, Symbol(i,Decl(symbolProperty18.ts,0,3))
|
|
>Symbol.iterator : symbol, Symbol(SymbolConstructor.iterator,Decl(lib.d.ts,1236,31))
|
|
>Symbol : SymbolConstructor, Symbol(Symbol,Decl(lib.d.ts,1186,52),Decl(lib.d.ts,1262,11))
|
|
>iterator : symbol, Symbol(SymbolConstructor.iterator,Decl(lib.d.ts,1236,31))
|
|
|
|
var str = i[Symbol.toStringTag]();
|
|
>str : string, Symbol(str,Decl(symbolProperty18.ts,7,3))
|
|
>i[Symbol.toStringTag]() : string
|
|
>i[Symbol.toStringTag] : () => string
|
|
>i : { [Symbol.iterator]: number; [Symbol.toStringTag](): string; [Symbol.toPrimitive]: boolean; }, Symbol(i,Decl(symbolProperty18.ts,0,3))
|
|
>Symbol.toStringTag : symbol, Symbol(SymbolConstructor.toStringTag,Decl(lib.d.ts,1248,24))
|
|
>Symbol : SymbolConstructor, Symbol(Symbol,Decl(lib.d.ts,1186,52),Decl(lib.d.ts,1262,11))
|
|
>toStringTag : symbol, Symbol(SymbolConstructor.toStringTag,Decl(lib.d.ts,1248,24))
|
|
|
|
i[Symbol.toPrimitive] = false;
|
|
>i[Symbol.toPrimitive] = false : boolean
|
|
>i[Symbol.toPrimitive] : boolean
|
|
>i : { [Symbol.iterator]: number; [Symbol.toStringTag](): string; [Symbol.toPrimitive]: boolean; }, Symbol(i,Decl(symbolProperty18.ts,0,3))
|
|
>Symbol.toPrimitive : symbol, Symbol(SymbolConstructor.toPrimitive,Decl(lib.d.ts,1242,21))
|
|
>Symbol : SymbolConstructor, Symbol(Symbol,Decl(lib.d.ts,1186,52),Decl(lib.d.ts,1262,11))
|
|
>toPrimitive : symbol, Symbol(SymbolConstructor.toPrimitive,Decl(lib.d.ts,1242,21))
|
|
>false : boolean
|
|
|