You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
π @btd! I just came across your library β looks great! WDYT of adding typescript typings so that users could avoid these errors in TS imports:
Could not find a declaration file for module 'sharp-phash'. '/path/tp/project/node_modules/.pnpm/[email protected][email protected]/node_modules/sharp-phash/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/sharp-phash` if it exists or add a new declaration (.d.ts) file containing `declare module 'sharp-phash';`ts(7016)
In the meantime, this serves as a workaround:
// @ts-expect-error -- upstream types do not exist: https://github.com/btd/sharp-phash/issues/14importphashfrom"sharp-phash";// @ts-expect-error -- upstream types do not exist: https://github.com/btd/sharp-phash/issues/14importphashDistancefrom"sharp-phash/distance";
The text was updated successfully, but these errors were encountered:
Cool! Shall I create a PR that adds index.d.ts? This will be a minor or a patch change (up to your preference). Refactoring everything to ts may be a bit more involved.
π @btd! I just came across your library β looks great! WDYT of adding typescript typings so that users could avoid these errors in TS imports:
In the meantime, this serves as a workaround:
The text was updated successfully, but these errors were encountered: