UNPKG

699 BTypeScriptView Raw
1// Type definitions for level 6.0
2// Project: https://github.com/Level/level
3// Definitions by: danielfx90 <https://github.com/danielfx90>
4// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
6import { AbstractOptions, ErrorCallback } from "abstract-leveldown";
7
8import EncodingDown from "encoding-down";
9
10import levelup = require("levelup");
11
12declare namespace Level {
13 interface LevelDB<K = any, V = any> extends levelup.LevelUp<EncodingDown<K, V>> {
14 errors: typeof levelup.errors;
15 }
16 interface Constructor {
17 (location: string, options?: AbstractOptions, callback?: ErrorCallback): LevelDB;
18 }
19}
20
21declare const Level: Level.Constructor;
22
23export = Level;