# @types/settings

> TypeScript definitions for settings

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

## Install

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

## Health

**Score 45/100 (D)** — status: abandoned.

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

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2023-11-07 |
| First published | 2018-03-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51450 |
| Maintainers | types |

## Links

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

## Recent versions

- 0.1.4 (latest) — 2023-11-07
- 0.1.1 (ts3.6) — 2021-07-06
- 0.1.0 (ts2.2) — 2018-03-06
- 0.1.3 — 2023-10-18
- 0.1.2 — 2023-09-25

## README

# Installation
> `npm install --save @types/settings`

# Summary
This package contains type definitions for settings (https://github.com/mgutz/node-settings).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/settings.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/settings/index.d.ts)
````ts
// This wierd looking class definition is necessary since the function that the module
// exposes NEEDS (will throw error otherwise) to be called with the `new` keyword
// BUT returns a random object...not an instance of the class
declare class Settings {
    constructor(pathOrModule: Settings.PathOrModule, options?: Settings.Options);

    [setting: string]: any;
}

declare namespace Settings {
    interface Options {
        env?: string | undefined;
        root?: string | undefined;
        defaults?: any;
    }

    type PathOrModule =
        | string
        | {
            forceEnv?: string | undefined;
            common: any; // error is thrown if 'common' object is not provided
            [envName: string]: any;
        };
}
export = Settings;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: none

# Credits
These definitions were written by [Shrey Jain](https://github.com/shreyjain1994).

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