[Vue TS Plugin] False expression: Script kind should match provided
is thrown when different script kinds are given for the same file name.
#57631
Labels
Bug
A bug in TypeScript
Acknowledgement
Comment
Vue TS Plugin determines the script kind of the script based on the lang attr of the script tag. For
<script lang="js">
the script kind is JS, and for<script lang="ts">
the script kind is TS. When the user changes the script tag lang attr fromjs
tots
, the return value of Vue TS Plugin in getScriptKind will also change, which causes tsserver to throw:Debug Failure. False expression: Script kind should match provided ScriptKind: 3 and sourceFile.scriptKind: 1, !entry: false
Steps to reproduce
src/components/HelloWorld.vue
<script lang="ts"
to<script lang="js"
TypeScript: Open TS Server log
command, then following error should be show:The text was updated successfully, but these errors were encountered: