vetur error on "import type" statements
See original GitHub issueFor Typescript users who want to import a type (and signal that they aren’t going to instantiate any objects from the module), it’s nice to be able to import type
like this:
...
<script lang="ts">
import type { AxiosError } from 'axios';
...
right now this results in: Cannot find name 'AxiosError'.Vetur(2304)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Documentation - TypeScript 3.8
TypeScript 3.8 adds a new syntax for type-only imports and exports. ... error! A type-only import can specify a default import or named...
Read more >Problems with Vue 3.2 <script setup> tag and TypeScript types
I have defined a user prop with a type of User that I imported from the Firebase SDK. This works, but I get...
Read more >Cannot be compiled under '--isolatedModules' because it is ...
When the isolatedModules option is set to true , all files in your project must be modules (must contain at least 1 import...
Read more >import module error with Vue 2.0 and typescript
Error comes from typescript language service, not from the IDE; Typescript compiler/service doesn't currently handle .vue files (https://github.
Read more >How to fix error TS7016: Could not find a declaration file for ...
If you're using TypeScript you might have run into this error before. The second part of the error says: Try `npm install @types/XYZ`...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh, sorry. Can you open a new issue? I will take a look.
What do you mean, correct syntax ? This is valid, it compiles and runs correctly.
I just omitted the import and export of the Vue component because it is not pertinent in this issue