intl-tel-input icon indicating copy to clipboard operation
intl-tel-input copied to clipboard

TypeScript module typing for intl-tel-input/utils missing

Open mitchellderijcke opened this issue 11 months ago • 1 comments

Hi there,

First of all: I'm enjoying using this package, thanks for that!

TypeScript is complaining at me because I'm using this line (ES Modules):

loadUtils: () => import("intl-tel-input/utils"),
Could not find a declaration file for module 'intl-tel-input/utils'. '[...]/node_modules/.pnpm/[email protected]/node_modules/intl-tel-input/build/js/utils.js' implicitly has an 'any' type.
  If the 'intl-tel-input' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module 'intl-tel-input/utils';`ts(7016)

But the only known module to TS is intl-tel-input/utils-compiled:

https://github.com/jackocnr/intl-tel-input/blob/4535f07c093cf376a9c33357e305bfd175dd2f80/build/js/intlTelInput.d.ts#L483

While the module is just intl-tel-input/utils:

https://github.com/jackocnr/intl-tel-input/blob/4535f07c093cf376a9c33357e305bfd175dd2f80/package.json#L120

Would you mind taking a look at this? Thanks!

mitchellderijcke avatar Jan 29 '25 14:01 mitchellderijcke

This issue is solved in open PR #1929. I'm waitng for author to check it and merge.

Bartek20 avatar Jan 30 '25 16:01 Bartek20

This should now be fixed in v25.4.0. Let me know if you're still having problems.

jackocnr avatar Aug 20 '25 12:08 jackocnr