Literal String Union Autocomplete now working inside .vue file
See original GitHub issueInfo
- Platform: Win10 Home
- Vetur version: 0.27.3
- VS Code version: 1.49.1
Problem
Autocomplete for string literal union type not working inside .vue file (with <script lang="ts">
). But working just fine inside .ts file.
Working nice in test.ts
No autocomplete, only information in test.vue
Reproducible Case
Declare any kind of type with string literal union type. Expected: Give autocomplete just as in a .ts file. Reality: No autocomplete in .vue file
Note: I’m not really sure where to post this: vue, vetur or vscode. And i also not really sure whether this should be a bug report or feature request. But since in the vetur doc they said that
The IntelliSense should be almost the same to the IntelliSense in js/ts files So maybe this is the right place to post this.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Intellisense not working for .vue files - Stack Overflow
The problem: when I update any code, intellisense won't recognise the changes when working in a .vue file. In .ts files, intellisense IS...
Read more >WebStorm 223.4884.72 Release Notes | Knowledge Base
Bug, WEB-56138, Type narrowing for string literal discriminated unions ... LESS, Bug, WEB-56591, Autocomplete not work in css when path include alias.
Read more >prettier bracket spacing - Flip Robo
When using -style=file, clang-format for each input file will try to find the .clang UAs should support reasonably useful ranges and precisions. Following...
Read more >@volar/source-map | Yarn - Package Manager
Changelog. 1.0.11 (2022/12/3). fix(vue-tsc): dts emit do not generated DefineComponent type (#2161); fix: global components types loss in vue 2 projects ...
Read more >CHANGELOG.md · igiting/vetur - Gitee.com
Fix no complete literal string union. ... Vetur now offers auto completion inside Vue interpolations, that is, {{ }} block, v-if / @click...
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
https://github.com/vuejs/vetur/commit/aaff6be212d24ef25ba0156b825504fb1c250521
I cannot recall why I made this change. I’ll revert it for now. If I do encounter the bug I’ll fix it again…
@octref any news on this ? In the meantime i think i would rather has that unwanted completion than not auto-complete at all. Literal String Union is a great way to restraint option, I use them alot and auto-complete will help alot in vue file. Unwanted completion can be cancel with a simple
Esc
. The benefit outweight the uncomfortable IMO