@types/config
- Version 3.3.5
- Published
- 8.67 kB
- No dependencies
- MIT license
Install
npm i @types/config
yarn add @types/config
pnpm add @types/config
Overview
TypeScript definitions for config
Index
Variables
variable c
var c: c.IConfig;
Interfaces
interface IConfig
interface IConfig {}
By augmenting this interface with your own config, you can greatly improve the IntelliSense for the
get
method: - Dot notation paths for thesetting
parameter - Correctly typed return valuesExample 1
declare module 'config' { interface IConfig extends MyConfig {} }
Example 2
declare module 'config' { interface IConfig { myConfig: { myString: string; myNumber: number; }; } }
Example 3
const knownToBeStringTyped = config.get('myConfig.myString');
interface IConfigSource
interface IConfigSource {}
interface IUtil
interface IUtil {}
method cloneDeep
cloneDeep: (copyFrom: any, depth?: number) => any;
method diffDeep
diffDeep: (object1: any, object2: any, depth?: number) => any;
method equalsDeep
equalsDeep: (object1: any, object2: any, dept?: number) => boolean;
method extendDeep
extendDeep: { (mergeInto: any, mergeFrom: any, depth?: number): any; (mergeInto: any, mergeFrom1: any, mergeFrom2: any, depth?: number): any; (mergeInto: any, ...mergeFrom: any): any;};
method getConfigSources
getConfigSources: () => IConfigSource[];
method getEnv
getEnv: (varName: string) => string;
method loadFileConfigs
loadFileConfigs: (configDir?: string) => any;
method makeHidden
makeHidden: (object: any, propertyName: string, propertyValue?: string) => any;
method makeImmutable
makeImmutable: ( object: any, propertyName?: string, propertyValue?: string) => any;
method setModuleDefaults
setModuleDefaults: (moduleName: string, defaults: any) => any;
This allows module developers to attach their configurations onto the default configuration object so they can be configured by the consumers of the module.
method setPath
setPath: (object: object, path: string[], value?: any) => void;
method toObject
toObject: (config?: any) => any;
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 oneto 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/config
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/config)
- HTML<a href="https://www.jsdocs.io/package/@types/config"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2753 ms. - Missing or incorrect documentation? Open an issue for this package.