@types/config 0.0.32 → 0.0.36
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/LICENSE +21 -0
- config/README.md +3 -3
- config/defer.d.ts +8 -0
- config/index.d.ts +68 -55
- config/package.json +28 -6
- config/raw.d.ts +10 -0
- config/types-metadata.json +0 -27
config/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE
|
config/README.md
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
This package contains type definitions for node-config (https://github.com/lorenwest/node-config).
|
|
6
6
|
|
|
7
7
|
# Details
|
|
8
|
-
Files were exported from https://
|
|
8
|
+
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/config
|
|
9
9
|
|
|
10
10
|
Additional Details
|
|
11
|
-
* Last updated: Thu,
|
|
11
|
+
* Last updated: Thu, 07 Nov 2019 19:27:31 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: none
|
|
14
14
|
|
|
15
15
|
# Credits
|
|
16
|
-
These definitions were written by Roman Korneev <https://github.com/RWander>.
|
|
16
|
+
These definitions were written by Roman Korneev <https://github.com/RWander>, Forrest Bice <https://github.com/forrestbice>, James Donald <https://github.com/jndonald3>, and Alberto Vasquez <https://github.com/albertovasquez>.
|
config/defer.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
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
CHANGED
|
@@ -1,55 +1,68 @@
|
|
|
1
|
-
// Type definitions for node-config
|
|
2
|
-
// Project: https://github.com/lorenwest/node-config
|
|
3
|
-
// Definitions by: Roman Korneev <https://github.com/RWander>
|
|
4
|
-
//
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
// Return
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
//
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
//
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
// Make
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
//
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
//
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
// Return the
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
1
|
+
// Type definitions for node-config
|
|
2
|
+
// Project: https://github.com/lorenwest/node-config
|
|
3
|
+
// Definitions by: Roman Korneev <https://github.com/RWander>
|
|
4
|
+
// Forrest Bice <https://github.com/forrestbice>
|
|
5
|
+
// James Donald <https://github.com/jndonald3>
|
|
6
|
+
// Alberto Vasquez <https://github.com/albertovasquez>
|
|
7
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
declare var c: c.IConfig;
|
|
12
|
+
|
|
13
|
+
declare namespace c {
|
|
14
|
+
|
|
15
|
+
// see https://github.com/lorenwest/node-config/wiki/Using-Config-Utilities
|
|
16
|
+
interface IUtil {
|
|
17
|
+
// Extend an object (and any object it contains) with one or more objects (and objects contained in them).
|
|
18
|
+
extendDeep(mergeInto: any, mergeFrom: any, depth?: number): any;
|
|
19
|
+
|
|
20
|
+
// Return a deep copy of the specified object.
|
|
21
|
+
cloneDeep(copyFrom: any, depth?: number): any;
|
|
22
|
+
|
|
23
|
+
// Return true if two objects have equal contents.
|
|
24
|
+
equalsDeep(object1: any, object2: any, dept?: number): boolean;
|
|
25
|
+
|
|
26
|
+
// Returns an object containing all elements that differ between two objects.
|
|
27
|
+
diffDeep(object1: any, object2: any, depth?: number): any;
|
|
28
|
+
|
|
29
|
+
// Make a javascript object property immutable (assuring it cannot be changed from the current value).
|
|
30
|
+
makeImmutable(object: any, propertyName?: string, propertyValue?: string): any;
|
|
31
|
+
|
|
32
|
+
// Make an object property hidden so it doesn't appear when enumerating elements of the object.
|
|
33
|
+
makeHidden(object: any, propertyName: string, propertyValue?: string): any;
|
|
34
|
+
|
|
35
|
+
// Get the current value of a config environment variable
|
|
36
|
+
getEnv(varName: string): string;
|
|
37
|
+
|
|
38
|
+
// Return the config for the project based on directory param if not directory then return default one (config).
|
|
39
|
+
loadFileConfigs(configDir: string): any;
|
|
40
|
+
|
|
41
|
+
// Return the sources for the configurations
|
|
42
|
+
getConfigSources(): IConfigSource[];
|
|
43
|
+
|
|
44
|
+
// Returns a new deep copy of the current config object, or any part of the config if provided.
|
|
45
|
+
toObject(config?: any): any;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* This allows module developers to attach their configurations onto
|
|
49
|
+
* the 6 years agoInitial 0.4 checkin default configuration object so
|
|
50
|
+
* they can be configured by the consumers of the module.
|
|
51
|
+
*/
|
|
52
|
+
setModuleDefaults(moduleName:string, defaults:any): any;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface IConfig {
|
|
56
|
+
get<T>(setting: string): T;
|
|
57
|
+
has(setting: string): boolean;
|
|
58
|
+
util: IUtil;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
interface IConfigSource {
|
|
62
|
+
name: string;
|
|
63
|
+
original?: string;
|
|
64
|
+
parsed: any;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export = c;
|
config/package.json
CHANGED
|
@@ -1,17 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/config",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.36",
|
|
4
4
|
"description": "TypeScript definitions for node-config",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"
|
|
6
|
+
"contributors": [
|
|
7
|
+
{
|
|
8
|
+
"name": "Roman Korneev",
|
|
9
|
+
"url": "https://github.com/RWander",
|
|
10
|
+
"githubUsername": "RWander"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "Forrest Bice",
|
|
14
|
+
"url": "https://github.com/forrestbice",
|
|
15
|
+
"githubUsername": "forrestbice"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "James Donald",
|
|
19
|
+
"url": "https://github.com/jndonald3",
|
|
20
|
+
"githubUsername": "jndonald3"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "Alberto Vasquez",
|
|
24
|
+
"url": "https://github.com/albertovasquez",
|
|
25
|
+
"githubUsername": "albertovasquez"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
7
28
|
"main": "",
|
|
29
|
+
"types": "index.d.ts",
|
|
8
30
|
"repository": {
|
|
9
31
|
"type": "git",
|
|
10
|
-
"url": "https://
|
|
32
|
+
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
|
33
|
+
"directory": "types/config"
|
|
11
34
|
},
|
|
12
35
|
"scripts": {},
|
|
13
36
|
"dependencies": {},
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"typeScriptVersion": "2.0"
|
|
37
|
+
"typesPublisherContentHash": "7b330a392ec054c7fa535d15a5b772013c97f7c7cfd645169796d9aac7f09cb7",
|
|
38
|
+
"typeScriptVersion": "2.8"
|
|
17
39
|
}
|
config/raw.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
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>;
|
config/types-metadata.json
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "config",
|
|
3
|
-
"libraryName": "node-config",
|
|
4
|
-
"sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped",
|
|
5
|
-
"data": {
|
|
6
|
-
"authors": "Roman Korneev <https://github.com/RWander>",
|
|
7
|
-
"dependencies": {},
|
|
8
|
-
"pathMappings": {},
|
|
9
|
-
"libraryMajorVersion": 0,
|
|
10
|
-
"libraryMinorVersion": 0,
|
|
11
|
-
"typeScriptVersion": "2.0",
|
|
12
|
-
"libraryName": "node-config",
|
|
13
|
-
"typingsPackageName": "config",
|
|
14
|
-
"projectName": "https://github.com/lorenwest/node-config",
|
|
15
|
-
"sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped",
|
|
16
|
-
"globals": [],
|
|
17
|
-
"declaredModules": [
|
|
18
|
-
"config/."
|
|
19
|
-
],
|
|
20
|
-
"files": [
|
|
21
|
-
"index.d.ts"
|
|
22
|
-
],
|
|
23
|
-
"hasPackageJson": false,
|
|
24
|
-
"contentHash": "2339aeaea1fab2c9eeecdf220961dcd39e6506f37cea6ccbd0fb40d48195fa51"
|
|
25
|
-
},
|
|
26
|
-
"isLatest": true
|
|
27
|
-
}
|