mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add missing methods to config
This commit is contained in:
@@ -19,6 +19,9 @@ const format : convict.Format = {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
convict.addFormat(format);
|
||||
convict.addFormats({
|
||||
prime: {
|
||||
@@ -113,4 +116,10 @@ if (conf.has('key')) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
conf.getSchema();
|
||||
conf.getProperties();
|
||||
conf.getSchemaString();
|
||||
conf.toString();
|
||||
|
||||
// vim:et:sw=2:ts=2
|
||||
|
||||
Vendored
+22
@@ -31,6 +31,28 @@ declare module "convict" {
|
||||
loadFile(file: string): void;
|
||||
loadFile(files: string[]): void;
|
||||
validate(): void;
|
||||
/**
|
||||
* Exports all the properties (that is the keys and their current values) as a {JSON} {Object}
|
||||
* @returns {Object} A {JSON} compliant {Object}
|
||||
*/
|
||||
getProperties() : Object;
|
||||
/**
|
||||
* Exports the schema as a {JSON} {Object}
|
||||
* @returns {Object} A {JSON} compliant {Object}
|
||||
*/
|
||||
getSchema() : Object;
|
||||
|
||||
/**
|
||||
* Exports all the properties (that is the keys and their current values) as a JSON string.
|
||||
* @returns {String} a string representing this object
|
||||
*/
|
||||
toString() : string;
|
||||
|
||||
/**
|
||||
* Exports the schema as a JSON string.
|
||||
* @returns {String} a string representing the schema of this {Config}
|
||||
*/
|
||||
getSchemaString() : string;
|
||||
}
|
||||
}
|
||||
interface convict {
|
||||
|
||||
Reference in New Issue
Block a user