backend.ai-webui icon indicating copy to clipboard operation
backend.ai-webui copied to clipboard

Apply type alias or interface for better type validation

Open agatha197 opened this issue 3 years ago • 0 comments

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

agatha197 avatar Aug 30 '22 09:08 agatha197