Closed tkrotoff closed 5 years ago
Can you elaborate on what this means? Are you just looking for TypeScript types?
If so, a PR would be welcome...
Ok, I’m new to TypeScript but I’m curious.
Thanks for sharing your starter definition, I’ll see if I can find time to get around to adding it next week.
I've added the TypeScript definitions and released in 2.0.16
.
@tkrotoff Can you please try out the definitions in the new version and let me know if it works for you so I can close this issue? Thanks!
File types.d.ts is not part of the package: https://unpkg.com/browse/html-webpack-tags-plugin@2.0.16/
I guess you have to add types.d.ts to files
inside package.json: https://docs.npmjs.com/files/package.json#files
...
"files": [
"index.js",
"types.d.ts"
],
...
Oh crap! yeah I only tested locally with import HtmlWebpackTagsPlugin from "../typings.d.ts";
I'll publish another version with the file added. Sorry about that, and thanks for reporting it!
Published in 2.0.17
. That should do the trick.
It works fine, thx!
Current type definition I use in my projects (something like
types/html-webpack-tags-plugin.d.ts
):Then you have autocompletion using vscode or whatever smart editor/IDE:
3 solutions (see https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html):