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

Missings typings property in package.json in beta #1108

Closed
SimonSchick opened this issue Nov 12, 2018 · 9 comments · Fixed by #1132
Closed

Missings typings property in package.json in beta #1108

SimonSchick opened this issue Nov 12, 2018 · 9 comments · Fixed by #1132

Comments

@SimonSchick
Copy link

Expected behaviour

Types load correctly.

Current behaviour

Types do not load.

Environment

Latest TS version on node 10.12.

Config

import HTMLPlugin from 'html-webpack-plugin';

Relevant Links

https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html

@SimonSchick
Copy link
Author

Actually, the typings you are shipping seem to be incorrect in general as you are not exporting the class instance correctly.

@jantimon
Copy link
Owner

Could you please be a little bit more concrete?

@SimonSchick
Copy link
Author

@hornta
Copy link

hornta commented Jan 6, 2019

Or we can rename typings.d.ts to index.d.ts according to https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html

@wingrunr21
Copy link
Contributor

Adding a types property is advised even if it is named index.d.ts

@jantimon
Copy link
Owner

jantimon commented Jan 6, 2019

But we don’t export the typings - we use the typescript salsa feature jsdocs as typings.

The typings.d.ts is just an internal helper for the html-webpack-plugin.

However the typescript team is working on generating definition files from salsa files.

Once that works we will provide a typing file which we will link from the package.json to the type file

@jantimon jantimon closed this as completed Jan 6, 2019
@jantimon jantimon reopened this Jan 6, 2019
@wingrunr21
Copy link
Contributor

@jantimon does that mean you aren't interested in merging #1132? I opened that precisely so that this project would export typings that are usable in TS based webpack configs.

@jantimon
Copy link
Owner

jantimon commented Jan 7, 2019

The main idea was to prevent bugs by using types from webpack.

If the changes you did on #1132 are enough to provide external typings then I am happy to make them public as types

@lock lock bot locked as resolved and limited conversation to collaborators Feb 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants