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

No declaration file #37

Closed
abbyblachman opened this issue Mar 2, 2021 · 2 comments
Closed

No declaration file #37

abbyblachman opened this issue Mar 2, 2021 · 2 comments

Comments

@abbyblachman
Copy link

I get this error when trying to use the plugin:

Could not find a declaration file for module 'moment-timezone-data-webpack-plugin'. '/Users/abbyblachman/Desktop/the19th-wp-theme/node_modules/moment-timezone-data-webpack-plugin/src/index.js' implicitly has an 'any' type.
  Try `npm install @types/moment-timezone-data-webpack-plugin` if it exists or add a new declaration (.d.ts) file containing `declare module 'moment-timezone-data-webpack-plugin';`ts(7016)
@gilmoreorless
Copy link
Owner

Yep, there's definitely no declaration file, entirely due to laziness on my part. The projects I wrote this plugin for didn't use TypeScript for the webpack config, so the lack of declarations was never a problem.

I'll take a look at adding one soon. 😃

@gilmoreorless
Copy link
Owner

I've published version 1.5.0 which contains a .d.ts declaration file.

I tested the definitions locally in temporary projects using webpack 4 and 5. But I know TS can be fussy about declarations sometimes, so let me know if you run into any problems.

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

No branches or pull requests

2 participants