angular-docs-cn/packages/core/test/change_detection/iterable.ts

17 lines
428 B
TypeScript

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {getSymbolIterator} from '@angular/core/src/util';
export class TestIterable {
list: number[];
constructor() { this.list = []; }
[getSymbolIterator()]() { return (this.list as any)[getSymbolIterator()](); }
}