-
-
Notifications
You must be signed in to change notification settings - Fork 738
Type definitions only for development #335
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
Conversation
No, this was already correct. If we're using them as a dependency, the type must also be a dependency otherwise you need to re-install them all again. If there's an issue with the definition causing duplicates, that needs to be fixed in DefinitelyTyped first. |
That can't be fixed with DefinitleyTyped because I'm not using @types but still typings. And that's why there are duplicate definitions. Typings are not needed for runtime! |
@DaSchTour I didn't say they are needed for runtime. But they are needed for sub-dependencies that are exposed transitively. I can feel your pain, I still use Typings myself too because |
@blakeembrey I still don't get why @types are added to dependencies while they are not needed at runtime. Typings are for development only. NPM-Package should be like a binary. Just executable. So there is no need to add type definitions as there also shouldn't be any typescript left for runtime. |
I'm not sure you understand the difference here then. |
But I don't want and don't need to compile typedoc package so I don't want the typings. |
Again, this is not about compiling the typedoc package. This is for other people using it programmatically with TypeScript. |
@types are only needed for development. Installing them as dependencies installs them on every project that uses typedocs which may lead to duplicate identifiers if @types isn't used in the project or if @types expose functions that are not really available.