npm.io
0.1.3 • Published 2 years ago

@types/quick-store

Licence
MIT
Version
0.1.3
Deps
0
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/quick-store

Summary

This package contains type definitions for quick-store (https://www.npmjs.com/package/quick-store (repository is deleted)).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/quick-store.

index.d.ts

export = QuickStore;

interface DatabaseContents {
    [key: string]: Value;
}
type Value = string | number | DatabaseContents | Value[] | boolean | null;
type Callback<Value> = (data: Value) => void;

declare function QuickStore(filename?: string, data?: DatabaseContents): QuickStore.Database;

declare namespace QuickStore {
    interface Database {
        put(data: DatabaseContents, callback?: Callback<DatabaseContents>): void;
        setItem(key: string, value: Value, callback?: Callback<DatabaseContents>): void;
        getItem(key: string, callback: Callback<Value>): void;
        removeItem(key: string, callback?: Callback<DatabaseContents>): void;
        clear(callback?: Callback<DatabaseContents>): void;
        get(callback: Callback<DatabaseContents>): void;
        get(): DatabaseContents;
        change(filename: string): void;
    }
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 0939 GMT
  • Dependencies: none

Credits

These definitions were written by Glenn.