From 8e8599340387938291b555c36c7dfb5ef8ef497f Mon Sep 17 00:00:00 2001 From: Bryan Date: Sat, 20 Jan 2024 22:50:32 +0800 Subject: [PATCH] Fix TypeScript definitions of `all()` and `nextv()` (#67) --- types/abstract-iterator.d.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/types/abstract-iterator.d.ts b/types/abstract-iterator.d.ts index 48f45e7..821a014 100644 --- a/types/abstract-iterator.d.ts +++ b/types/abstract-iterator.d.ts @@ -102,10 +102,10 @@ export class AbstractIterator extends CommonIterator): 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 @@ -117,10 +117,10 @@ export class AbstractIterator extends CommonIterator): 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()},