-
-
Notifications
You must be signed in to change notification settings - Fork 527
Closed as duplicate of#5899
Failing to parse pug function call inside a conditional named template slot (regression since 3.1.6)#5914
Bug
Copy link
Labels
good reproduction ✨This issue provides a good reproduction, we will be able to investigate it firstThis issue provides a good reproduction, we will be able to investigate it first🔨 p3-minor-bug
Description
Vue - Official extension or vue-tsc version
3.2.1
VSCode version
- (repeatable in command line, no need to have VSCode)
Vue version
3.5.26
TypeScript version
5.9.3
System Info
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 20.19.1 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.8.2 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpmpackage.json dependencies
"dependencies": {
"vue": "^3.5.26",
"vue-router": "^4.6.4"
},
"devDependencies": {
"@vue/language-plugin-pug": "^3.2.1",
"nuxt": "^3.20.2",
"pug": "^3.0.3",
"typescript": "^5.9.3",
"vue-tsc": "^3.2.1"
}Steps to reproduce
<script setup lang="ts">
function getNumber() {
return 123;
}
</script>
<template lang="pug">
test-view
template(v-if="true" #help)
| {{ getNumber() }}
</template>From what I've tested, all parts are required: it should be a non-default slot with v-if, and a function call.
In the minimal reproduction at Stackblitz (see link below), this code is inside app.vue. To repeat the bug, simply run:
pnpm nuxt typecheckWhat is expected?
No error during type check — the code is valid.
What is actually happening?
❯ pnpm nuxt typecheck
ERROR (node:30) ExperimentalWarning: WASI is an experimental feature and might change at any time 4:11:38 PM
(Use node --trace-warnings ... to show where the warning was created)
app.vue:10:22 - error TS1005: ')' expected.
10 | {{ getNumber() }}
~
Found 1 error in app.vue:10
Link to minimal reproduction
https://stackblitz.com/edit/nuxt-starter-yl6fbd5x
Any additional comments?
I bisected this to be a regression introduced in vue-tsc 3.1.6. The code is handled fine in 3.1.5 and earlier.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good reproduction ✨This issue provides a good reproduction, we will be able to investigate it firstThis issue provides a good reproduction, we will be able to investigate it first🔨 p3-minor-bug