jquery-resizable icon indicating copy to clipboard operation
jquery-resizable copied to clipboard

package.json missing types: ?

Open matti777 opened this issue 3 years ago • 0 comments

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" />

matti777 avatar Jan 25 '22 09:01 matti777