renative icon indicating copy to clipboard operation
renative copied to clipboard

Add type checking for config props

Open mihaiblaga89 opened this issue 5 years ago • 4 comments

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.

mihaiblaga89 avatar Oct 07 '19 09:10 mihaiblaga89

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.

stale[bot] avatar Dec 06 '19 10:12 stale[bot]

getConfigProp is now TS generics based method which utilizes autogenerated TS schema definitions to extract correct type

pavjacko avatar Nov 24 '23 03:11 pavjacko

@pavjacko @mihaiblaga89 is there a way to test this?

pauliusguzas avatar Dec 20 '23 12:12 pauliusguzas

@pauliusguzas no. it's a technical chore. marking it as ready

pavjacko avatar Jan 02 '24 10:01 pavjacko