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

Style Guide: TypeScript #1

Open
etki opened this issue Feb 3, 2020 · 0 comments
Open

Style Guide: TypeScript #1

etki opened this issue Feb 3, 2020 · 0 comments

Comments

@etki
Copy link
Contributor

etki commented Feb 3, 2020

Some things that otherwise would be forgotten:

  • Simple types (such as aliases, one-liners and so on) should be specified as type X = ... without any prefix
  • Complex types should be specified as interfaces and named with I prefix. This may be necessary to distinguish custom types from platform types (e.g. IFunction)
  • Enums: every enum that may serve as input value should be easily decoded from string, since it may come from some sort of configuration
  • Package exports: minimum nesting, import {X} ... type Y = X.Z.Nani is not an option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant