From 592d0403d180fc0fe79352999da27e288fdefa9c Mon Sep 17 00:00:00 2001 From: Nimish Telang Date: Wed, 13 Jan 2016 17:59:59 +0000 Subject: [PATCH] Refine format type in schema --- convict/convict.d.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/convict/convict.d.ts b/convict/convict.d.ts index 51c1f6a689..87788e0963 100644 --- a/convict/convict.d.ts +++ b/convict/convict.d.ts @@ -16,7 +16,16 @@ declare module "convict" { [name: string]: convict.Schema | { default: any; doc?: string; - format?: any; + /** + * From the implementation: + * + * format can be a: + * - predefine type, as seen below + * - an array of enumerated values, e.g. ["production", "development", "testing"] + * - built-in JavaScript type, i.e. Object, Array, String, Number, Boolean + * - or if omitted, the Object.prototype.toString.call of the default value + */ + format?: string | Array | Function; env?: string; arg?: string; };