Skip to content

Commit

Permalink
Revert Iterator Inference
Browse files Browse the repository at this point in the history
  • Loading branch information
sinclairzx81 committed Nov 18, 2023
1 parent f500f1a commit 12c4472
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/typebox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,9 @@ export interface TArray<T extends TSchema = TSchema> extends TSchema, ArrayOptio
// --------------------------------------------------------------------------
// TAsyncIterator
// --------------------------------------------------------------------------
export type TAsyncIteratorResolve<T extends TSchema, P extends unknown[]> = Ensure<AsyncIterableIterator<Static<T, P>>>
export interface TAsyncIterator<T extends TSchema = TSchema> extends TSchema {
[Kind]: 'AsyncIterator'
static: TAsyncIteratorResolve<T, this['params']>
static: AsyncIterableIterator<Static<T, this['params']>>
type: 'AsyncIterator'
items: T
}
Expand Down Expand Up @@ -477,10 +476,9 @@ export interface TIntersect<T extends TSchema[] = TSchema[]> extends TSchema, In
// --------------------------------------------------------------------------
// TIterator
// --------------------------------------------------------------------------
export type TIteratorResolve<T extends TSchema, P extends unknown[]> = Ensure<IterableIterator<Static<T, P>>>
export interface TIterator<T extends TSchema = TSchema> extends TSchema {
[Kind]: 'Iterator'
static: TIteratorResolve<T, this['params']>
static: IterableIterator<Static<T, this['params']>>
type: 'Iterator'
items: T
}
Expand Down

0 comments on commit 12c4472

Please sign in to comment.