Skip to content

Commit

Permalink
Fix TypeScript definitions of all() and nextv() (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
ImSingee authored Jan 20, 2024
1 parent 18409b7 commit 8e85993
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions types/abstract-iterator.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ export class AbstractIterator<TDatabase, K, V> extends CommonIterator<TDatabase,
* @param options Options (none at the moment, reserved for future use).
* @param callback Error-first callback. If none is provided, a promise is returned.
*/
nextv (size: number, options: {}, callback: NodeCallback<[[K, V]]>): void
nextv (size: number, callback: NodeCallback<[[K, V]]>): void
nextv (size: number, options: {}): Promise<[[K, V]]>
nextv (size: number): Promise<[[K, V]]>
nextv (size: number, options: {}, callback: NodeCallback<[K, V][]>): void
nextv (size: number, callback: NodeCallback<[K, V][]>): void
nextv (size: number, options: {}): Promise<[K, V][]>
nextv (size: number): Promise<[K, V][]>

/**
* Advance repeatedly and get all (remaining) entries as an array, automatically
Expand All @@ -117,10 +117,10 @@ export class AbstractIterator<TDatabase, K, V> extends CommonIterator<TDatabase,
* @param options Options (none at the moment, reserved for future use).
* @param callback Error-first callback. If none is provided, a promise is returned.
*/
all (options: {}, callback: NodeCallback<[[K, V]]>): void
all (callback: NodeCallback<[[K, V]]>): void
all (options: {}): Promise<[[K, V]]>
all (): Promise<[[K, V]]>
all (options: {}, callback: NodeCallback<[K, V][]>): void
all (callback: NodeCallback<[K, V][]>): void
all (options: {}): Promise<[K, V][]>
all (): Promise<[K, V][]>

/**
* Seek to the key closest to {@link target}. Subsequent calls to {@link next()},
Expand Down

0 comments on commit 8e85993

Please sign in to comment.