Skip to content

Commit 16ae68a

Browse files
jkremsclydin
authored andcommitted
refactor(@angular-devkit/core): use more precise iterator typings
Since this class isn't a "real" `Set`, we can't promise that our iterators are true `SetIterator<T>`s.
1 parent 24453e7 commit 16ae68a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

goldens/public-api/angular_devkit/core/index.api.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -567,15 +567,15 @@ export class PartiallyOrderedSet<T> {
567567
clear(): void;
568568
// (undocumented)
569569
delete(item: T): boolean;
570-
entries(): SetIterator<[T, T]>;
570+
entries(): IterableIterator<[T, T]>;
571571
// (undocumented)
572572
forEach(callbackfn: (value: T, value2: T, set: PartiallyOrderedSet<T>) => void, thisArg?: any): void;
573573
// (undocumented)
574574
has(item: T): boolean;
575-
keys(): SetIterator<T>;
575+
keys(): IterableIterator<T>;
576576
// (undocumented)
577577
get size(): number;
578-
values(): SetIterator<T>;
578+
values(): IterableIterator<T>;
579579
}
580580

581581
// @public

packages/angular_devkit/core/src/utils/partially-ordered-set.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class PartiallyOrderedSet<T> {
5151
/**
5252
* Returns an iterable of [v,v] pairs for every value `v` in the set.
5353
*/
54-
*entries(): SetIterator<[T, T]> {
54+
*entries(): IterableIterator<[T, T]> {
5555
for (const item of this) {
5656
yield [item, item];
5757
}
@@ -60,14 +60,14 @@ export class PartiallyOrderedSet<T> {
6060
/**
6161
* Despite its name, returns an iterable of the values in the set,
6262
*/
63-
keys(): SetIterator<T> {
63+
keys(): IterableIterator<T> {
6464
return this.values();
6565
}
6666

6767
/**
6868
* Returns an iterable of values in the set.
6969
*/
70-
values(): SetIterator<T> {
70+
values(): IterableIterator<T> {
7171
return this[Symbol.iterator]();
7272
}
7373

0 commit comments

Comments
 (0)