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

Updated package.json to export type definitions #43

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

RaffaeleSgarro
Copy link

@RaffaeleSgarro RaffaeleSgarro commented Aug 13, 2023

Without the types key in the export section of package.json the typescript compiler complains that cannot find a declaration file:

error TS7016: Could not find a declaration file for module '@vueuse/sound'. 'C:/[redacted]/node_modules/@vueuse/sound/dist/index.mjs' implicitly has an 'any' type.
  There are types at 'C:/[redacted]/node_modules/@vueuse/sound/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@vueuse/sound' library may need to update its package.json or typings.

21 import { useSound } from '@vueuse/sound';
                            ~~~~~~~~~~~~~~~


Found 1 error in src/App.vue:21

ERROR: "type-check" exited with 2.

Closes #42

@oliver139
Copy link

I think this is quite a urgent issue with simple solution. Hope this PR can be merge so soon..

@mshamaseen
Copy link

The package doesn't work on new TS versions, hope this PR resolve it soon

@mshamaseen
Copy link

would appreciate if you can merge this @Tahul

@Sengulair
Copy link

Hope this will be merged soon. Import problem with types error still exist

@Emily-0616
Copy link

I sincerely hope to get your help @Tahul

@makroxyz
Copy link

makroxyz commented May 9, 2024

Please merge!

@ezBeanie
Copy link

Can this be merged?

@oliver139
Copy link

@Tahul Is this repo no longer maintain?

@itsrafsanjani
Copy link

@Tahul Can you please merge this?

@mathiasayivor
Copy link

This is becoming an issue can this be merged?

@oliver139
Copy link

@Tahul Can you please merge this soon?
Used his fix for quite a while and should have no problem.

@byronogis
Copy link

Use this PR and pnpm patch temporarily to make the type work, hope handle soon

@Ares-Chang
Copy link

hi @antfu

I'm so sorry to interrupt, but this repository has not been maintained for a long time, and now a ts type export is needed, this pr has been ready for a long time, but no one has permission to handle it.

Please help to deal with it, I believe this is still a very popular package

Thanks

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 this pull request may close these issues.

Could not find a declaration file for module '@vueuse/sound'