0.1.3 • Published 6 months ago

@types/quick-store v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for quick-store 0.1
// Project: https://www.npmjs.com/package/quick-store (repository is deleted)
// Definitions by: Glenn <https://github.com/promise>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

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: Sun, 03 Oct 2021 08:31:25 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Glenn.

0.1.2

7 months ago

0.1.1

9 months ago

0.1.3

6 months ago

0.1.0

3 years ago