Skip to content

Commit ee54608

Browse files
authored
Support strictBuiltinIteratorReturn (#1949)
1 parent 5469a48 commit ee54608

File tree

4 files changed

+4
-16
lines changed

4 files changed

+4
-16
lines changed

src/Map.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,7 @@ export function pop<K>(E: Eq<K>): (k: K) => <A>(m: Map<K, A>) => Option<[A, Map<
217217
}
218218
}
219219

220-
interface Next<A> {
221-
readonly done?: boolean
222-
readonly value: A
223-
}
220+
type Next<A> = IteratorResult<A, undefined>
224221

225222
// TODO: remove non-curried overloading in v3
226223
/**

src/ReadonlyMap.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,7 @@ export function member<K>(E: Eq<K>): <A>(k: K, m?: ReadonlyMap<K, A>) => boolean
9595
}
9696
}
9797

98-
interface Next<A> {
99-
readonly done?: boolean
100-
readonly value: A
101-
}
98+
type Next<A> = IteratorResult<A, undefined>
10299

103100
// TODO: remove non-curried overloading in v3
104101
/**

src/ReadonlySet.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,7 @@ export function toSet<A>(s: ReadonlySet<A>): Set<A> {
6161
return new Set(s)
6262
}
6363

64-
interface Next<A> {
65-
readonly done?: boolean
66-
readonly value: A
67-
}
64+
type Next<A> = IteratorResult<A, undefined>
6865

6966
/**
7067
* Projects a Set through a function

src/Set.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,7 @@ export function chain<B>(E: Eq<B>): <A>(f: (x: A) => Set<B>) => (set: Set<A>) =>
6767
}
6868
}
6969

70-
interface Next<A> {
71-
readonly done?: boolean
72-
readonly value: A
73-
}
70+
type Next<A> = IteratorResult<A, undefined>
7471

7572
/**
7673
* @since 2.0.0

0 commit comments

Comments
 (0)