Skip to content

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

Closed
wants to merge 1 commit into from
Closed

Type definitions only for development #335

wants to merge 1 commit into from

Conversation

DaSchTour
Copy link

@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.

@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.
@blakeembrey
Copy link
Member

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.

@DaSchTour
Copy link
Author

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!

@blakeembrey
Copy link
Member

@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 @types is still not complete, but saying the solution is to remove all dependencies is even more wrong. Have you tried changing types in tsconfig.json?

@DaSchTour
Copy link
Author

@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.

@blakeembrey
Copy link
Member

I'm not sure you understand the difference here then. devDependencies would mean that you have to install the @types. Again, I said nothing about runtime. It's needed for TypeScript compilation.

@DaSchTour
Copy link
Author

But I don't want and don't need to compile typedoc package so I don't want the typings.

@blakeembrey
Copy link
Member

blakeembrey commented Dec 23, 2016

Again, this is not about compiling the typedoc package. This is for other people using it programmatically with TypeScript.

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

Successfully merging this pull request may close these issues.

2 participants