From b353fb45b00165222aa616111ddc8ae00e9a860a Mon Sep 17 00:00:00 2001 From: Vincent Weevers Date: Mon, 22 Jan 2018 09:36:40 +0100 Subject: [PATCH] update TypeScript typings for v4 * remove approximateSize() and isLevelDOWN() * make Batch value optional * add missing db property to AbstractIterator --- index.d.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/index.d.ts b/index.d.ts index b2caaec4..56fb04c9 100644 --- a/index.d.ts +++ b/index.d.ts @@ -19,8 +19,6 @@ interface AbstractLevelDOWN): AbstractIterator; - approximateSize(start: K, end: K, cb: (err: any, size: number) => void): void; - [index: string]: any; } @@ -42,7 +40,7 @@ export interface AbstractIteratorOptions { values?: boolean; } -export type Batch = PutBatch | DelBatch +export type Batch = PutBatch | DelBatch export interface PutBatch { type: 'put', @@ -56,6 +54,7 @@ export interface DelBatch { } interface AbstractIterator { + db: any; next(callback: (err: any, key: K, value: V) => void): void; end(callback: (err: any) => void): void; } @@ -82,4 +81,3 @@ interface AbstractChainedBatchConstructor { export const AbstractLevelDOWN: AbstractLevelDOWNConstructor export const AbstractIterator: AbstractIteratorConstructor export const AbstractChainedBatch: AbstractChainedBatchConstructor -export function isLevelDOWN(db: any): boolean;