@types/configstore

  • Version 6.0.2
  • Published
  • 5.41 kB
  • No dependencies
  • MIT license

Install

npm i @types/configstore
yarn add @types/configstore
pnpm add @types/configstore

Overview

TypeScript definitions for configstore

Index

Classes

class Configstore

class Configstore {}

    constructor

    constructor(packageName: string, defaults?: any, options?: ConfigstoreOptions);

      property all

      all: any;
      • Get all items as an object or replace the current config with an object.

      property path

      path: string;
      • Get the path to the config file. Can be used to show the user where it is, or better, open it for them.

      property size

      size: number;
      • Get the item count

      method clear

      clear: () => void;
      • Clear the config. Equivalent to Configstore.all = {};

      method delete

      delete: (key: string) => void;
      • Delete an item.

        Parameter key

        The key to delete

      method get

      get: (key: string) => any;
      • Get an item

        Parameter key

        The string key to get The contents of the config from key $key

      method has

      has: (key: string) => boolean;
      • Determines if a key is present in the config

        Parameter key

        The string key to test for True if the key is present

      method set

      set: { (key: string, val: any): void; (values: any): void };
      • Set an item

        Parameter key

        The string key

        Parameter val

        The value to set

      • Set all key/value pairs declared in $values

        Parameter values

        The values object.

      Interfaces

      interface ConfigstoreOptions

      interface ConfigstoreOptions {}

        property configPath

        configPath?: string | undefined;

          property globalConfigPath

          globalConfigPath?: boolean | undefined;

            Package Files (1)

            Dependencies (0)

            No dependencies.

            Dev Dependencies (0)

            No dev dependencies.

            Peer Dependencies (0)

            No peer dependencies.

            Badge

            To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

            You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/configstore.

            • Markdown
              [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/configstore)
            • HTML
              <a href="https://www.jsdocs.io/package/@types/configstore"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>