question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Literal String Union Autocomplete now working inside .vue file

See original GitHub issue
  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • 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 working

No autocomplete, only information in test.vue not_working

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:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
octrefcommented, Sep 21, 2020

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…

0reactions
tuan-lmcommented, Oct 1, 2020

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found