Skip to content
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

Typescript unable to find typings #95

Closed
mattfysh opened this issue Nov 18, 2023 · 4 comments
Closed

Typescript unable to find typings #95

mattfysh opened this issue Nov 18, 2023 · 4 comments

Comments

@mattfysh
Copy link

Hi there, thanks for your great npm packages!

Inspecting the package.json from the recent v10 and it appears the layout has changed. Did you intend to move index.d.ts under the exports.types key? previously it was located in the root types field

I'm using the latest version of typescript and it appears that it fails to find the correct types with the new layout

Cheers!

@mattfysh
Copy link
Author

Apologies, this was a tsconfig issue

@perry-mitchell
Copy link

perry-mitchell commented Dec 8, 2023

@mattfysh Would you mind sharing what the issue was, exactly? Having the same problem.

@mattfysh
Copy link
Author

mattfysh commented Dec 8, 2023

@perry-mitchell it was one of these, hope it works for you!

"module": "esnext",
"moduleResolution": "bundler",

@jakub-tucek
Copy link

I just used this hack to avoid changing tsconfig. Would need some tweaks if you plan to use other exported types though:

memoize.d.ts

declare module 'memoize' {
	import * as m from 'memoize/dist/index';
	export default m.default;
}

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

3 participants