-
Notifications
You must be signed in to change notification settings - Fork 7
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
Typescript types definition location #17
Comments
I prefer to use declaration files as well if types are shared across multiple files |
It's always better to have separate declaration files. However, how those typings are going to be used defines if it's better to put them in a My rule of thumb is: is the typings supposed to be consumed by other apps/libs? |
@kaisermann honestly i don't like global types. @salesfelipe has an opinion on the use of |
@emersonlaurentino probably because he needed the |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
What is to be discussed?
Typescript types definition location.
Describe the solution you'd like
Create a declaration file when they are common between files, otherwise leave inside the file itself. But never create global types.
Additional context
There are developers who declare types within the file itself and export to other files, there are others who like global types and others who define them in a declaration file.
The text was updated successfully, but these errors were encountered: