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

Error whit Vu3 (vite) and library #9

Closed
macJames976 opened this issue Apr 4, 2022 · 3 comments
Closed

Error whit Vu3 (vite) and library #9

macJames976 opened this issue Apr 4, 2022 · 3 comments

Comments

@macJames976
Copy link

I have same code:

import { Number } from "@coders-tm/vue-number-format";

but i have this error from IDE:

Could not find a declaration file for module '@coders-tm/vue-number-format'. 'C:/Users/username/folder1/projectfolder/node_modules/@coders-tm/vue-number-format/dist/index.cjs.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/coders-tm__vue-number-format` if it exists or add a new declaration (.d.ts) file containing `declare module '@coders-tm/vue-number-format';`ts(7016)
@dipaksarkar
Copy link
Contributor

@macJames976 It doesn't support typescript. :(

@macJames976
Copy link
Author

I don’t use typescript…

@dipaksarkar
Copy link
Contributor

dipaksarkar commented Apr 7, 2022

@macJames976 It's seems that you have import Number which is not exported. Only you can import followings:

  1. number,
  2. vNumber,
  3. options,
  4. NumberFormat

And the issue you are getting because you selected vue-ts when created a vite project. You have to select vue to use this plugin to vite project.

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

2 participants