Skip to content

Commit 8e85993

Browse files
authored
Fix TypeScript definitions of all() and nextv() (#67)
1 parent 18409b7 commit 8e85993

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

types/abstract-iterator.d.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ export class AbstractIterator<TDatabase, K, V> extends CommonIterator<TDatabase,
102102
* @param options Options (none at the moment, reserved for future use).
103103
* @param callback Error-first callback. If none is provided, a promise is returned.
104104
*/
105-
nextv (size: number, options: {}, callback: NodeCallback<[[K, V]]>): void
106-
nextv (size: number, callback: NodeCallback<[[K, V]]>): void
107-
nextv (size: number, options: {}): Promise<[[K, V]]>
108-
nextv (size: number): Promise<[[K, V]]>
105+
nextv (size: number, options: {}, callback: NodeCallback<[K, V][]>): void
106+
nextv (size: number, callback: NodeCallback<[K, V][]>): void
107+
nextv (size: number, options: {}): Promise<[K, V][]>
108+
nextv (size: number): Promise<[K, V][]>
109109

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

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

0 commit comments

Comments
 (0)