Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add runtime type checks for config #543

Open
podliashanyk opened this issue Feb 20, 2024 · 1 comment
Open

Add runtime type checks for config #543

podliashanyk opened this issue Feb 20, 2024 · 1 comment
Labels
blocked Depends on other issue being solved bug Something is not working as expected priority: low usability Improves ease of use

Comments

@podliashanyk
Copy link
Contributor

podliashanyk commented Feb 20, 2024

With TS, type guards can not be applied at runtime for optional config values. Thus when values of incorrect types are provided in runtime-config.json, the app does not work as expected.

Suggested solution
Show error message if config is provided with values of incorrect types.. Add user defined type guards to config.tsx. F.e. as described here https://stackoverflow.com/a/43279180

Depends on #536 being merged.

@podliashanyk podliashanyk added bug Something is not working as expected usability Improves ease of use blocked Depends on other issue being solved priority: low labels Feb 20, 2024
@podliashanyk
Copy link
Contributor Author

podliashanyk commented Feb 20, 2024

Setting low prio since expected formats of config values are documented in #536, so this shouldnt be a serious issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Depends on other issue being solved bug Something is not working as expected priority: low usability Improves ease of use
Projects
None yet
Development

No branches or pull requests

1 participant