Skip to content

package.json missing types: ? #46

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

Open
matti777 opened this issue Jan 25, 2022 · 0 comments
Open

package.json missing types: ? #46

matti777 opened this issue Jan 25, 2022 · 0 comments

Comments

@matti777
Copy link

matti777 commented Jan 25, 2022

I'm trying to use this wonderful plugin in a Typescript / Webpack project and it would appear it is not finding the Typescript definitions (eg. the resizable() function for the JQuery interface). I did a little digging and it would appear that package.json should (could) have a types: property to indicate where the TS type definitions are located (see: https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html).

So something like:

"types": "./dist/jquery-resizable.d.ts",

Unless I'm mistaken. Or is there another way to do this? Still a bit fresh with typescript/webpack here.

EDIT: Can make it work by adding a reference to index.d.ts:

/// <reference types="jquery-resizable-dom/dist/jquery-resizable.js" />

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

1 participant