-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
The feauture or bug you are proposing
The user should be able to use a config with any property value type.
The description of the bug or the rationale of your proposal
the type type CustomService<Config extends ServiceConfig = ServiceConfig> in the customPlugin namepsce is too restrictive with the extends ServiceConfig since ServiceConfig is a NodeJS.Dict<string | number> by default. The type then breaks whenever you have a property in you config that is not a stringor a number (ex. a boolean)
A snippet of code for replicating the issue or showing the proposal usage if applicable
The type breaks if you declare something as such:
type Env = {prop: boolean}
const customService = customPlugin<Env>(envJsonSchema)
The expected result for your bug
I would expect the ServiceConfig type to not be a NodeJS.Dict<string | number> but a NodeJS.Dict<unknown>
Your environment
node: v16.17.0
custom-plugin-lib: 5.1.3
os: Ubuntu
Metadata
Metadata
Assignees
Labels
No labels