@types/config 3.3.4 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- config/README.md +3 -15
- config/package.json +7 -45
- config/async.d.ts +0 -7
- config/defer.d.ts +0 -8
- config/index.d.ts +0 -61
- config/raw.d.ts +0 -10
config/README.md
CHANGED
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
# Summary
|
|
5
|
-
This package contains type definitions for config (https://github.com/lorenwest/node-config).
|
|
6
|
-
|
|
7
|
-
# Details
|
|
8
|
-
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/config.
|
|
9
|
-
|
|
10
|
-
### Additional Details
|
|
11
|
-
* Last updated: Thu, 21 Mar 2024 20:35:57 GMT
|
|
12
|
-
* Dependencies: none
|
|
13
|
-
|
|
14
|
-
# Credits
|
|
15
|
-
These definitions were written by [Roman Korneev](https://github.com/RWander), [Forrest Bice](https://github.com/forrestbice), [James Donald](https://github.com/jndonald3), [Alberto Vasquez](https://github.com/albertovasquez), [Christian Vaagland Tellnes](https://github.com/tellnes), and [Paritosh Bhatia](https://github.com/ParitoshBh).
|
|
1
|
+
This is a stub types definition for @types/config (http://github.com/node-config/node-config.git).
|
|
2
|
+
|
|
3
|
+
config provides its own type definitions, so you don't need @types/config installed!
|
config/package.json
CHANGED
|
@@ -1,50 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/config",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "TypeScript definitions for config",
|
|
5
|
-
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/config",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"contributors": [
|
|
8
|
-
{
|
|
9
|
-
"name": "Roman Korneev",
|
|
10
|
-
"githubUsername": "RWander",
|
|
11
|
-
"url": "https://github.com/RWander"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"name": "Forrest Bice",
|
|
15
|
-
"githubUsername": "forrestbice",
|
|
16
|
-
"url": "https://github.com/forrestbice"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"name": "James Donald",
|
|
20
|
-
"githubUsername": "jndonald3",
|
|
21
|
-
"url": "https://github.com/jndonald3"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"name": "Alberto Vasquez",
|
|
25
|
-
"githubUsername": "albertovasquez",
|
|
26
|
-
"url": "https://github.com/albertovasquez"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"name": "Christian Vaagland Tellnes",
|
|
30
|
-
"githubUsername": "tellnes",
|
|
31
|
-
"url": "https://github.com/tellnes"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"name": "Paritosh Bhatia",
|
|
35
|
-
"githubUsername": "ParitoshBh",
|
|
36
|
-
"url": "https://github.com/ParitoshBh"
|
|
37
|
-
}
|
|
38
|
-
],
|
|
3
|
+
"version": "4.4.0",
|
|
4
|
+
"description": "Stub TypeScript definitions entry for config, which provides its own types definitions",
|
|
39
5
|
"main": "",
|
|
40
|
-
"types": "index.d.ts",
|
|
41
|
-
"repository": {
|
|
42
|
-
"type": "git",
|
|
43
|
-
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
|
44
|
-
"directory": "types/config"
|
|
45
|
-
},
|
|
46
6
|
"scripts": {},
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"config": "*"
|
|
10
|
+
},
|
|
11
|
+
"deprecated": "This is a stub types definition. config provides its own type definitions, so you do not need this installed."
|
|
50
12
|
}
|
config/async.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IConfig } from "./";
|
|
2
|
-
|
|
3
|
-
type AsyncFunction<T, R> = (this: IConfig, config: string, origValue: T) => Promise<R>;
|
|
4
|
-
|
|
5
|
-
export function asyncConfig<R>(promise: Promise<any>): Promise<R>;
|
|
6
|
-
export function asyncConfig<T, R>(func: AsyncFunction<T, R>): Promise<R>;
|
|
7
|
-
export function resolveAsyncConfigs(config: IConfig): Promise<IConfig>;
|
config/defer.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
type DeferFunction<T, R> = (this: any, origValue: T) => R;
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
* Allows a config value to be deferred for later. The original config object is passed
|
|
5
|
-
* into func as "this".
|
|
6
|
-
* See: https://github.com/lorenwest/node-config/wiki/Special-features-for-JavaScript-configuration-files#deferred-values-in-javascript-configuration-files
|
|
7
|
-
*/
|
|
8
|
-
export function deferConfig<T, R>(func: DeferFunction<T, R>): R;
|
config/index.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
declare var c: c.IConfig;
|
|
2
|
-
|
|
3
|
-
declare namespace c {
|
|
4
|
-
// see https://github.com/lorenwest/node-config/wiki/Using-Config-Utilities
|
|
5
|
-
interface IUtil {
|
|
6
|
-
// Extend an object (and any object it contains) with one or more objects (and objects contained in them).
|
|
7
|
-
extendDeep(mergeInto: any, mergeFrom: any, depth?: number): any;
|
|
8
|
-
extendDeep(mergeInto: any, mergeFrom1: any, mergeFrom2: any, depth?: number): any;
|
|
9
|
-
extendDeep(mergeInto: any, ...mergeFrom: any): any;
|
|
10
|
-
|
|
11
|
-
// Return a deep copy of the specified object.
|
|
12
|
-
cloneDeep(copyFrom: any, depth?: number): any;
|
|
13
|
-
|
|
14
|
-
// Set objects given a path as a string list
|
|
15
|
-
setPath(object: object, path: string[], value?: any): void;
|
|
16
|
-
|
|
17
|
-
// Return true if two objects have equal contents.
|
|
18
|
-
equalsDeep(object1: any, object2: any, dept?: number): boolean;
|
|
19
|
-
|
|
20
|
-
// Returns an object containing all elements that differ between two objects.
|
|
21
|
-
diffDeep(object1: any, object2: any, depth?: number): any;
|
|
22
|
-
|
|
23
|
-
// Make a javascript object property immutable (assuring it cannot be changed from the current value).
|
|
24
|
-
makeImmutable(object: any, propertyName?: string, propertyValue?: string): any;
|
|
25
|
-
|
|
26
|
-
// Make an object property hidden so it doesn't appear when enumerating elements of the object.
|
|
27
|
-
makeHidden(object: any, propertyName: string, propertyValue?: string): any;
|
|
28
|
-
|
|
29
|
-
// Get the current value of a config environment variable
|
|
30
|
-
getEnv(varName: string): string;
|
|
31
|
-
|
|
32
|
-
// Return the config for the project based on directory param if not directory then return default one (config).
|
|
33
|
-
loadFileConfigs(configDir?: string): any;
|
|
34
|
-
|
|
35
|
-
// Return the sources for the configurations
|
|
36
|
-
getConfigSources(): IConfigSource[];
|
|
37
|
-
|
|
38
|
-
// Returns a new deep copy of the current config object, or any part of the config if provided.
|
|
39
|
-
toObject(config?: any): any;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* This allows module developers to attach their configurations onto the default configuration object
|
|
43
|
-
* so they can be configured by the consumers of the module.
|
|
44
|
-
*/
|
|
45
|
-
setModuleDefaults(moduleName: string, defaults: any): any;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
interface IConfig {
|
|
49
|
-
get<T>(setting: string): T;
|
|
50
|
-
has(setting: string): boolean;
|
|
51
|
-
util: IUtil;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
interface IConfigSource {
|
|
55
|
-
name: string;
|
|
56
|
-
original?: string | undefined;
|
|
57
|
-
parsed: any;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export = c;
|
config/raw.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/* The raw function returns an object as-is instead of passing it through processes that will make the object immutable.
|
|
2
|
-
* See: https://github.com/lorenwest/node-config/wiki/Special-features-for-JavaScript-configuration-files#using-promises-processstdout-and-other-objects-in-javascript-config-files
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export class RawConfig<T> {
|
|
6
|
-
constructor(rawObj: T);
|
|
7
|
-
resolve(): T;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function raw<T>(obj: T): RawConfig<T>;
|