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 error in main.ts: "Could not find a declaration file for module './quasar-user-options'." #53

Open
BenJackGill opened this issue May 7, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@BenJackGill
Copy link

BenJackGill commented May 7, 2022

Describe the bug
I have a Vue Cli project using TypeScript and the Quasar Plugin.

After installing the plugin I get this TypeScript error in main.ts:

Could not find a declaration file for module './quasar-user-options'. '/Users/my-user-account/Dev/my-project/src/quasar-user-options.js' implicitly has an 'any' type.ts (7016)

This error is showing because the quasar-user-options.js file should actually be quasar-user-options.ts.

After changing the file extension from .js to .ts the error goes away.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Vue Cli project with TypeScript support: vue create hello-world
  2. Add the Quasar plugin: vue add quasar
  3. Open main.ts file
  4. See error on the 4th line for "./quasar-user-options";`

Expected behavior
There should be no error.

Possible solution

The plugin could detect if the Vue Cli project is using TypeScript, and if so create quasar-user-options.ts not quasar-user-options.js.

If that is not possible there should at least be a note about this manually changing this in the docs.

@BenJackGill BenJackGill added the bug Something isn't working label May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant