@types/electron-json-storage
TypeScript icon, indicating that this package has built-in type declarations

4.5.4 • Public • Published

Installation

npm install --save @types/electron-json-storage

Summary

This package contains type definitions for electron-json-storage (https://github.com/electron-userland/electron-json-storage).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/electron-json-storage.

index.d.ts

export interface DataOptions {
    dataPath: string;
}
export function getDefaultDataPath(): string;
export function setDataPath(directory?: string): void;
export function getDataPath(): string;
export function get(key: string, callback: (error: any, data: object) => void): void;
export function get(key: string, options: DataOptions, callback: (error: any, data: object) => void): void;
export function getSync(key: string, options?: DataOptions): object;
export function getMany(keys: readonly string[], callback: (error: any, data: object) => void): void;
export function getMany(
    keys: readonly string[],
    options: DataOptions,
    callback: (error: any, data: object) => void,
): void;
export function getAll(callback: (error: any, data: object) => void): void;
export function getAll(options: DataOptions, callback: (error: any, data: object) => void): void;
export function set(key: string, json: object, callback: (error: any) => void): void;
export function set(key: string, json: object, options: DataOptions, callback: (error: any) => void): void;
export function has(key: string, callback: (error: any, hasKey: boolean) => void): void;
export function has(key: string, options: DataOptions, callback: (error: any, hasKey: boolean) => void): void;
export function keys(callback: (error: any, keys: string[]) => void): void;
export function keys(options: DataOptions, callback: (error: any, keys: string[]) => void): void;
export function remove(key: string, callback: (error: any) => void): void;
export function remove(key: string, options: DataOptions, callback: (error: any) => void): void;
export function clear(callback: (error: any) => void): void;
export function clear(options: DataOptions, callback: (error: any) => void): void;

Additional Details

  • Last updated: Mon, 20 Nov 2023 23:36:24 GMT
  • Dependencies: none

Credits

These definitions were written by Sam Saint-Pettersen, nrlquaker, and John Woodruff.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/electron-json-storage

Weekly Downloads

1,373

Version

4.5.4

License

MIT

Unpacked Size

6.57 kB

Total Files

5

Last publish

Collaborators

  • types