Add missing methods to config

This commit is contained in:
Nimish Telang
2016-01-13 17:18:43 +00:00
parent 321e862d5a
commit 981c9d1112
2 changed files with 31 additions and 0 deletions
+9
View File
@@ -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
+22
View File
@@ -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 {