TypeScript/tests/cases/conformance/es6/destructuring/iterableArrayPattern9.ts
2015-03-25 18:04:11 -07:00

16 lines
291 B
TypeScript

//@target: ES6
function fun([a, b] = new FooIterator) { }
class Bar { x }
class Foo extends Bar { y }
class FooIterator {
next() {
return {
value: new Foo,
done: false
};
}
[Symbol.iterator]() {
return this;
}
}