* Move iterabl related stuffs off from es2015.collection * Move symbol.wellknown stuffs off from es2015.collection * Add map & set constructor support when targeting ES5 * Address PR: move symbol.iterator to es2015.iterable * Move Symbol.Iterator into es2015.iterable * Update baselines
23 lines
1 KiB
Text
23 lines
1 KiB
Text
=== tests/cases/conformance/es6/Symbols/symbolProperty56.ts ===
|
|
var obj = {
|
|
>obj : Symbol(obj, Decl(symbolProperty56.ts, 0, 3))
|
|
|
|
[Symbol.iterator]: 0
|
|
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
|
|
>Symbol : Symbol(Symbol, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --))
|
|
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
|
|
|
|
};
|
|
|
|
module M {
|
|
>M : Symbol(M, Decl(symbolProperty56.ts, 2, 2))
|
|
|
|
var Symbol: {};
|
|
>Symbol : Symbol(Symbol, Decl(symbolProperty56.ts, 5, 7))
|
|
|
|
// The following should be of type 'any'. This is because even though obj has a property keyed by Symbol.iterator,
|
|
// the key passed in here is the *wrong* Symbol.iterator. It is not the iterator property of the global Symbol.
|
|
obj[Symbol["iterator"]];
|
|
>obj : Symbol(obj, Decl(symbolProperty56.ts, 0, 3))
|
|
>Symbol : Symbol(Symbol, Decl(symbolProperty56.ts, 5, 7))
|
|
}
|