TypeScript/tests/baselines/reference/iterableArrayPattern13.types

52 lines
2 KiB
Plaintext
Raw Normal View History

=== tests/cases/conformance/es6/destructuring/iterableArrayPattern13.ts ===
function fun([a, ...b]) { }
2015-04-13 23:01:57 +02:00
>fun : ([a, ...b]: Iterable<any>) => void, Symbol(fun, Decl(iterableArrayPattern13.ts, 0, 0))
>a : any, Symbol(a, Decl(iterableArrayPattern13.ts, 0, 14))
>b : any[], Symbol(b, Decl(iterableArrayPattern13.ts, 0, 16))
fun(new FooIterator);
>fun(new FooIterator) : void
2015-04-13 23:01:57 +02:00
>fun : ([a, ...b]: Iterable<any>) => void, Symbol(fun, Decl(iterableArrayPattern13.ts, 0, 0))
>new FooIterator : FooIterator
2015-04-13 23:01:57 +02:00
>FooIterator : typeof FooIterator, Symbol(FooIterator, Decl(iterableArrayPattern13.ts, 3, 27))
class Bar { x }
2015-04-13 23:01:57 +02:00
>Bar : Bar, Symbol(Bar, Decl(iterableArrayPattern13.ts, 1, 21))
>x : any, Symbol(x, Decl(iterableArrayPattern13.ts, 2, 11))
class Foo extends Bar { y }
2015-04-13 23:01:57 +02:00
>Foo : Foo, Symbol(Foo, Decl(iterableArrayPattern13.ts, 2, 15))
>Bar : Bar, Symbol(Bar, Decl(iterableArrayPattern13.ts, 1, 21))
>y : any, Symbol(y, Decl(iterableArrayPattern13.ts, 3, 23))
class FooIterator {
2015-04-13 23:01:57 +02:00
>FooIterator : FooIterator, Symbol(FooIterator, Decl(iterableArrayPattern13.ts, 3, 27))
next() {
2015-04-13 23:01:57 +02:00
>next : () => { value: Foo; done: boolean; }, Symbol(next, Decl(iterableArrayPattern13.ts, 4, 19))
return {
>{ value: new Foo, done: false } : { value: Foo; done: boolean; }
value: new Foo,
2015-04-13 23:01:57 +02:00
>value : Foo, Symbol(value, Decl(iterableArrayPattern13.ts, 6, 16))
>new Foo : Foo
2015-04-13 23:01:57 +02:00
>Foo : typeof Foo, Symbol(Foo, Decl(iterableArrayPattern13.ts, 2, 15))
done: false
2015-04-13 23:01:57 +02:00
>done : boolean, Symbol(done, Decl(iterableArrayPattern13.ts, 7, 27))
2015-04-13 21:36:11 +02:00
>false : boolean
};
}
[Symbol.iterator]() {
2015-04-13 23:01:57 +02:00
>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))
return this;
2015-04-13 23:01:57 +02:00
>this : FooIterator, Symbol(FooIterator, Decl(iterableArrayPattern13.ts, 3, 27))
}
}