mozilla / node-convict

Featureful configuration management library for Node.js
Other
2.35k stars 146 forks source link

"required" property should be a must-have #391

Open manudiv opened 3 years ago

AaronTorgerson commented 2 years ago

Agreed. It is rather odd to not be able to specify that "this property must be set from either a file or environment variable - no default is allowable".

ath88 commented 2 years ago

I would love this feature.

arminrosu commented 9 months ago

Additionally, the currently suggested way of setting default: null and format: String properties means that typings infer the values as null | undefined. Thus your build will fail if using Typescript, though on runtime only .validate() will throw an error.