oncall
oncall copied to clipboard
Improve type-safety: use autogenerated types across frontend codebase (part 1)
Part 1 of using autogenerated types, we should cover here alert groups, integrations and users
Acceptance criteria
- frontend has additional layer for making HTTP requests
- every HTTP request goes through this layer (e.g. prevent calling
makeRequestdirectly from components or MobX stores) - in this layer every HTTP request and response is typed using types imported from files generated as a part of https://github.com/grafana/oncall/issues/3330
- any other frontend code make use of generated types instead of custom types (e.g. use
enumfrom generated types instead of manualstringetc.)
Outcome
- better type-safety in code
- being able to catch type errors during development before they reach prod (shift left)
- better developer experience thanks to increased number of type declarations and improved intellisense