UNPKG

1.51 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/level`
3
4# Summary
5This package contains type definitions for level (https://github.com/Level/level).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/level.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/level/index.d.ts)
10````ts
11// Type definitions for level 6.0
12// Project: https://github.com/Level/level
13// Definitions by: danielfx90 <https://github.com/danielfx90>
14// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
15
16import { AbstractOptions, ErrorCallback } from "abstract-leveldown";
17
18import EncodingDown from "encoding-down";
19
20import levelup = require("levelup");
21
22declare namespace Level {
23 interface LevelDB<K = any, V = any> extends levelup.LevelUp<EncodingDown<K, V>> {
24 errors: typeof levelup.errors;
25 }
26 interface Constructor {
27 (location: string, options?: AbstractOptions, callback?: ErrorCallback): LevelDB;
28 }
29}
30
31declare const Level: Level.Constructor;
32
33export = Level;
34
35````
36
37### Additional Details
38 * Last updated: Thu, 17 Mar 2022 12:01:44 GMT
39 * Dependencies: [@types/abstract-leveldown](https://npmjs.com/package/@types/abstract-leveldown), [@types/encoding-down](https://npmjs.com/package/@types/encoding-down), [@types/levelup](https://npmjs.com/package/@types/levelup)
40 * Global values: none
41
42# Credits
43These definitions were written by [danielfx90](https://github.com/danielfx90).
44
\No newline at end of file