# @types/configstore

> TypeScript definitions for configstore

Latest version **6.0.2** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/configstore
pnpm add @types/configstore
yarn add @types/configstore
bun add @types/configstore
```

## Health

**Score 50/100 (C)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 6.0.2 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 5.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51438 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/configstore
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/configstore
- npm.io page: https://npm.io/package/@types/configstore

## Recent versions

- 6.0.2 (latest) — 2023-11-07
- 6.0.0 (ts4.0) — 2022-07-04
- 5.0.1 (ts3.6) — 2021-07-06
- 5.0.0 (ts3.5) — 2021-03-25
- 4.0.0 (ts2.0) — 2018-12-03
- 6.0.1 — 2023-10-18
- 2.1.1 — 2017-03-24
- 2.1.0 — 2017-01-03
- 0.3.30 — 2016-09-19
- 0.3.29 — 2016-07-14
- 0.3.28-alpha — 2016-07-08
- 0.3.27-alpha — 2016-07-03
- 0.3.26-alpha — 2016-07-02
- 0.3.25-alpha — 2016-07-01
- 0.3.24-alpha — 2016-07-01
- … 4 more at https://npm.io/package/@types/configstore/versions

## README

# Installation
> `npm install --save @types/configstore`

# Summary
This package contains type definitions for configstore (https://github.com/yeoman/configstore).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/configstore.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/configstore/index.d.ts)
````ts
export default class Configstore {
    constructor(packageName: string, defaults?: any, options?: ConfigstoreOptions);

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

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

    /**
     * Get the item count
     */
    size: number;

    /**
     * Get an item
     * @param key The string key to get
     * @return The contents of the config from key $key
     */
    get(key: string): any;

    /**
     * Set an item
     * @param key The string key
     * @param val The value to set
     */
    set(key: string, val: any): void;

    /**
     * Set all key/value pairs declared in $values
     * @param values The values object.
     */
    set(values: any): void;

    /**
     * Determines if a key is present in the config
     * @param key The string key to test for
     * @return True if the key is present
     */
    has(key: string): boolean;

    /**
     * Delete an item.
     * @param key The key to delete
     */
    delete(key: string): void;

    /**
     * Clear the config.
     * Equivalent to <code>Configstore.all = {};</code>
     */
    clear(): void;
}

export interface ConfigstoreOptions {
    globalConfigPath?: boolean | undefined;
    configPath?: string | undefined;
}

````

### Additional Details
 * Last updated: Mon, 06 Nov 2023 22:41:05 GMT
 * Dependencies: none

# Credits
These definitions were written by [ArcticLight](https://github.com/ArcticLight).

---
_Source: https://npm.io/package/@types/configstore · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
