diff --git a/types/level-js/index.d.ts b/types/level-js/index.d.ts index 5bda98c283..fa5341aa62 100644 --- a/types/level-js/index.d.ts +++ b/types/level-js/index.d.ts @@ -6,22 +6,23 @@ import { AbstractLevelDOWN, AbstractOptions } from 'abstract-leveldown'; -export interface Level extends AbstractLevelDOWN { - readonly location: string; - readonly prefix: string; - readonly version: string | number; - destroy(location: string, cb: (err: Error | undefined) => void): void; - destroy(location: string, prefix: string, cb: (err: Error | undefined) => void): void; +interface Level extends AbstractLevelDOWN { + readonly location: string; + readonly prefix: string; + readonly version: string | number; + destroy(location: string, cb: (err: Error | undefined) => void): void; + destroy(location: string, prefix: string, cb: (err: Error | undefined) => void): void; } -export interface LevelOptions { - readonly prefix?: string; - readonly version?: string | number; +interface LevelOptions { + readonly prefix?: string; + readonly version?: string | number; } -export interface LevelConstructor { - new (location: string, options?: LevelOptions): Level; - (location: string, options?: LevelOptions): Level; +interface LevelConstructor { + new (location: string, options?: LevelOptions): Level; + (location: string, options?: LevelOptions): Level; } -export const Level: LevelConstructor; +declare const Level: LevelConstructor; +export = Level; diff --git a/types/level-js/level-js-tests.ts b/types/level-js/level-js-tests.ts index 95ded31fa0..71a6789e2d 100644 --- a/types/level-js/level-js-tests.ts +++ b/types/level-js/level-js-tests.ts @@ -1,5 +1,5 @@ /// -import { Level } from 'level-js'; +import Level = require('level-js'); const db = Level('bigData'); const dbClass = new Level('bigData');