2015-03-26 01:36:47 +01:00
|
|
|
//@target: ES6
|
|
|
|
class Bar { x }
|
|
|
|
class Foo extends Bar { y }
|
|
|
|
class FooIterator {
|
|
|
|
next() {
|
|
|
|
return {
|
|
|
|
value: new Foo,
|
|
|
|
done: false
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
[Symbol.iterator]() {
|
|
|
|
return this;
|
|
|
|
}
|
2017-02-25 02:48:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
var a: Bar, b: string;
|
|
|
|
[a, b] = new FooIterator;
|