When importing validateCartItems inside a TypeScript project, you will get an error.
Example code:
import { validateCartItems } from 'use-shopping-cart/utilities'
Type error: Could not find a declaration file for module 'use-shopping-cart/utilities'. 'D:/dev/node/next.js/examples/with-stripe-typescript/node_modules/use-shopping-cart/utilities/index.js' implicitly has an 'any' type.
If the 'use-shopping-cart' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module 'use-shopping-cart/utilities';`
When importing
validateCartItems
inside a TypeScript project, you will get an error.Example code:
Related: https://github.com/dayhaysoos/use-shopping-cart/issues/231#issuecomment-927141560 https://github.com/vercel/next.js/issues/50541 https://github.com/vercel/next.js/pull/50574