@types/quick-store
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

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 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Glenn.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/quick-store

Weekly Downloads

1

Version

0.1.3

License

MIT

Unpacked Size

4.29 kB

Total Files

5

Last publish

Collaborators

  • types