99 AbstractBatchOperation ,
1010 AbstractBatchOptions ,
1111 AbstractChainedBatch ,
12+ AbstractChainedBatchWriteOptions ,
1213 AbstractIteratorOptions ,
1314 AbstractIterator ,
1415 AbstractKeyIterator ,
@@ -70,20 +71,20 @@ declare class ClassicLevel<KDefault = string, VDefault = string>
7071 del < K = KDefault > ( key : K , options : DelOptions < K > ) : Promise < void >
7172 del < K = KDefault > ( key : K , options : DelOptions < K > , callback : NodeCallback < void > ) : void
7273
73- batch ( operations : Array < AbstractBatchOperation < typeof this , KDefault , VDefault > > ) : Promise < void >
74- batch ( operations : Array < AbstractBatchOperation < typeof this , KDefault , VDefault > > , callback : NodeCallback < void > ) : void
75- batch < K = KDefault , V = VDefault > ( operations : Array < AbstractBatchOperation < typeof this , K , V > > , options : BatchOptions < K , V > ) : Promise < void >
76- batch < K = KDefault , V = VDefault > ( operations : Array < AbstractBatchOperation < typeof this , K , V > > , options : BatchOptions < K , V > , callback : NodeCallback < void > ) : void
74+ batch ( operations : Array < BatchOperation < typeof this , KDefault , VDefault > > ) : Promise < void >
75+ batch ( operations : Array < BatchOperation < typeof this , KDefault , VDefault > > , callback : NodeCallback < void > ) : void
76+ batch < K = KDefault , V = VDefault > ( operations : Array < BatchOperation < typeof this , K , V > > , options : BatchOptions < K , V > ) : Promise < void >
77+ batch < K = KDefault , V = VDefault > ( operations : Array < BatchOperation < typeof this , K , V > > , options : BatchOptions < K , V > , callback : NodeCallback < void > ) : void
7778 batch ( ) : ChainedBatch < typeof this , KDefault , VDefault >
7879
79- iterator ( ) : AbstractIterator < typeof this , KDefault , VDefault >
80- iterator < K = KDefault , V = VDefault > ( options : AbstractIteratorOptions < K , V > & AdditionalIteratorOptions ) : AbstractIterator < typeof this , K , V >
80+ iterator ( ) : Iterator < typeof this , KDefault , VDefault >
81+ iterator < K = KDefault , V = VDefault > ( options : IteratorOptions < K , V > ) : Iterator < typeof this , K , V >
8182
82- keys ( ) : AbstractKeyIterator < typeof this , KDefault >
83- keys < K = KDefault > ( options : AbstractKeyIteratorOptions < K > & AdditionalIteratorOptions ) : AbstractKeyIterator < typeof this , K >
83+ keys ( ) : KeyIterator < typeof this , KDefault >
84+ keys < K = KDefault > ( options : KeyIteratorOptions < K > ) : KeyIterator < typeof this , K >
8485
85- values ( ) : AbstractValueIterator < typeof this , KDefault , VDefault >
86- values < K = KDefault , V = VDefault > ( options : AbstractValueIteratorOptions < K , V > & AdditionalIteratorOptions ) : AbstractValueIterator < typeof this , K , V >
86+ values ( ) : ValueIterator < typeof this , KDefault , VDefault >
87+ values < K = KDefault , V = VDefault > ( options : ValueIteratorOptions < K , V > ) : ValueIterator < typeof this , K , V >
8788
8889 /**
8990 * Get the approximate number of bytes of file system space used by the range
@@ -297,7 +298,7 @@ export interface BatchOptions<K, V> extends AbstractBatchOptions<K, V>, WriteOpt
297298/**
298299 * Options for the {@link ChainedBatch.write} method.
299300 */
300- export interface ChainedBatchWriteOptions extends WriteOptions { }
301+ export interface ChainedBatchWriteOptions extends AbstractChainedBatchWriteOptions , WriteOptions { }
301302
302303export class ChainedBatch < TDatabase , KDefault , VDefault > extends AbstractChainedBatch < TDatabase , KDefault , VDefault > {
303304 write ( ) : Promise < void >
@@ -316,3 +317,14 @@ export interface StartEndOptions<K> {
316317 */
317318 keyEncoding ?: string | Transcoder . PartialEncoder < K > | undefined
318319}
320+
321+ // Export remaining types so that consumers don't have to guess whether they're extended
322+ export type BatchOperation < TDatabase , K , V > = AbstractBatchOperation < TDatabase , K , V >
323+
324+ export type Iterator < TDatabase , K , V > = AbstractIterator < TDatabase , K , V >
325+ export type KeyIterator < TDatabase , K > = AbstractKeyIterator < TDatabase , K >
326+ export type ValueIterator < TDatabase , K , V > = AbstractValueIterator < TDatabase , K , V >
327+
328+ export type IteratorOptions < K , V > = AbstractIteratorOptions < K , V > & AdditionalIteratorOptions
329+ export type KeyIteratorOptions < K > = AbstractKeyIteratorOptions < K > & AdditionalIteratorOptions
330+ export type ValueIteratorOptions < K , V > = AbstractValueIteratorOptions < K , V > & AdditionalIteratorOptions
0 commit comments