Open tmus opened 3 years ago
Describe the bug: In default.json, creating an object with a key of config breaks the type definitions for the config as a whole.
config
Steps To Reproduce:
For example:
// default.json { "config": { "some": "value" }, "someother": "value" }
Results in:
// Config.d.ts /* tslint:disable */ /* eslint-disable */ declare module "node-config-ts" { interface IConfig { config: Config someother: string } interface Config { some: string } export const config: Config export type Config = IConfig }
Typehinting now doesn't find the someother property on the config, only some, as part of the defined config object.
someother
some
Expected behavior:
Any of:
node-config-ts
Typescript Version: 4.0.5
node-config-ts version: 3.1.0
Describe the bug: In default.json, creating an object with a key of
config
breaks the type definitions for the config as a whole.Steps To Reproduce:
For example:
Results in:
Typehinting now doesn't find the
someother
property on the config, onlysome
, as part of the defined config object.Expected behavior:
Any of:
config
is a keyword and should not be used in confignode-config-ts
if aconfig
key exists.Typescript Version: 4.0.5
node-config-ts version: 3.1.0