diff --git a/convict/convict-tests.ts b/convict/convict-tests.ts index 3bd64c5929..56326c00b3 100644 --- a/convict/convict-tests.ts +++ b/convict/convict-tests.ts @@ -104,7 +104,7 @@ conf.loadFile(['./configs/always.json', './configs/sometimes.json']); // perform validation -conf.validate(); +conf.validate({ strict: true }); var port: number = conf.default('port'); diff --git a/convict/convict.d.ts b/convict/convict.d.ts index 05323de269..07bf5940ff 100644 --- a/convict/convict.d.ts +++ b/convict/convict.d.ts @@ -41,7 +41,7 @@ declare module "convict" { load(conf: Object): void; loadFile(file: string): void; loadFile(files: string[]): void; - validate(): void; + validate(options?: { strict?: boolean }): void; /** * Exports all the properties (that is the keys and their current values) as a {JSON} {Object} * @returns {Object} A {JSON} compliant {Object}