renative
renative copied to clipboard
Add type checking for config props
Is your feature request related to a problem? Please describe. Enforce type checking when parsing the configs.
Describe the solution you'd like
Either have another argument in getConfigProp
specifying what type of data to expect, or separate it into several functions, like getConfigString
, getConfigBool
. This will throw an error if, for example, you specify something else than true or false in a prop that's being passed through getConfigBool
.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
getConfigProp is now TS generics based method which utilizes autogenerated TS schema definitions to extract correct type
@pavjacko @mihaiblaga89 is there a way to test this?
@pauliusguzas no. it's a technical chore. marking it as ready