backend.ai-webui
backend.ai-webui copied to clipboard
Apply type alias or interface for better type validation
Is your feature request related to a problem? Please describe. Like https://github.com/lablup/backend.ai-webui/pull/1447, let's add the type alias or interface so that the IDE's compile can determine whether it is a valid value or not.
Describe the solution you'd like If there are specific variables that only determined set conditions, then add a type alias or interface.
Additional context
- References
- https://www.typescriptlang.org/docs/handbook/declaration-files/by-example.html
- https://bobbyhadz.com/blog/typescript-export-types
- https://stackoverflow.com/questions/37233735/interfaces-vs-types-in-typescript