[leveldown] Fix static functions (#27174)

This commit is contained in:
Linus Unnebäck 2018-07-21 03:09:22 +02:00 committed by Wesley Wigham
parent 38006605b1
commit 83aaaffa9f
2 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,7 @@
// Type definitions for LevelDown 1.7
// Project: https://github.com/level/leveldown
// Definitions by: Thiago de Arruda <https://github.com/tarruda>
// Linus Unnebäck <https://github.com/LinusU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
@ -137,9 +138,11 @@ interface LevelDown {
iterator(options?: ValueAsStringIteratorOptions): ValueAsStringIterator;
iterator(options?: KeyAndValueAsStringIteratorOptions): KeyAndValueAsStringIterator;
iterator(options?: KeyAndValueAsBufferIteratorOptions): KeyAndValueAsBufferIterator;
}
interface Constructor {
(location: string): LevelDown;
destroy(location: string, callback: ErrCallback): void;
repair(location: string, callback: ErrCallback): void;
}
type Constructor = (location: string) => LevelDown;
}

View File

@ -82,5 +82,5 @@ db.approximateSize("k1", "k2", (err, size) => {
db.compactRange("k1", "k2", (err) => {});
db.destroy("/path/to/db", (err) => {});
db.repair("/path/to/db", (err) => {});
leveldown.destroy("/path/to/db", (err) => {});
leveldown.repair("/path/to/db", (err) => {});