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 issue with moduleResolution: NodeNext #166

Closed
Mister-Hope opened this issue Aug 24, 2022 · 1 comment · May be fixed by juls0730/discord-clone#23
Closed

Typescript issue with moduleResolution: NodeNext #166

Mister-Hope opened this issue Aug 24, 2022 · 1 comment · May be fixed by juls0730/discord-clone#23

Comments

@Mister-Hope
Copy link
Contributor

Mister-Hope commented Aug 24, 2022

Typescript cannot find types for mitt when targeting esm while declaring moduleResolution: NodeNext.

import mitt from 'mitt';
// or 
import { default as mitt } from 'mitt';

Getting

error TS7016: Could not find a declaration file for module 'mitt'. '/home/mister-hope/projects/vuepress-theme-hope/node_modules/.pnpm/mitt@3.0.0/node_modules/mitt/dist/mitt.mjs' implicitly has an 'any' type.

The problem is that the export field is missing declaration file, also the project is not outputing a index.d.mts for index.mjs.

@developit
Copy link
Owner

Fixed in #167.

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

Successfully merging a pull request may close this issue.

2 participants