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

0.0.3 • Public • Published

Installation

npm install --save @types/chenyfan__cache-db

Summary

This package contains type definitions for @chenyfan/cache-db (https://www.npmjs.com/package/@chenyfan/cache-db).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chenyfan__cache-db.

index.d.ts

declare namespace CacheDB {
    interface Config {
        type: "json" | "arrayBuffer" | "blob" | "text" | string;
    }
    type ReadMethodData = object | ArrayBuffer | Blob | string | null;
    type WriteValue =
        | ReadableStream
        | Blob
        | ArrayBufferView
        | ArrayBuffer
        | FormData
        | URLSearchParams
        | string;
}

declare class CacheDB {
    constructor(namespace?: string, prefix?: string);

    namespace: string;
    prefix: string;

    read(key: string, config?: CacheDB.Config): Promise<CacheDB.ReadMethodData>;
    write(
        key: string | number | boolean,
        value: CacheDB.WriteValue,
        config?: CacheDB.Config,
    ): Promise<boolean>;
    delete(key: string): Promise<boolean>;
}

export = CacheDB;
export as namespace CacheDB;

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: none

Credits

These definitions were written by AHdark.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/chenyfan__cache-db

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

4.22 kB

Total Files

5

Last publish

Collaborators

  • types