You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to define a component's properties using an empty interface that extends another interface fails using withDefaults(defineProps<Props>(), { ... }
Additional context
Could be an issue in vuejs/core since this and this exist, but it was fixed in Vue 3.2.42 (2022-11-09).
Logs
[plugin:vite:vue] Transform failed with 1 error:
/home/projects/github-voetqy/components/VTest.vue:10:26: ERROR: Unexpected "}"
/home/projects/github-voetqy/components/VTest.vue:10:26
Unexpected "}"
8 |expose();
9 |
10 | const props = __props as };| ^
11 |
12 |
at failureErrorWithLog (file:///home/projects/github-voetqy/node_modules/esbuild/lib/main.js:1626:15)
at eval (file:///home/projects/github-voetqy/node_modules/esbuild/lib/main.js:827:29)
at responseCallbacks.<computed> (file:///home/projects/github-voetqy/node_modules/esbuild/lib/main.js:687:9)
at handleIncomingPacket (file:///home/projects/github-voetqy/node_modules/esbuild/lib/main.js:742:9)
at Socket.readFromStdout (file:///home/projects/github-voetqy/node_modules/esbuild/lib/main.js:663:7)
at EventEmitter.emit (https://githubvoetqy-0f5x.w-corp.staticblitz.com/blitz.c8358679.js:35:156830)
at S.emit (https://githubvoetqy-0f5x.w-corp.staticblitz.com/blitz.c8358679.js:35:1539231)
at addChunk (https://githubvoetqy-0f5x.w-corp.staticblitz.com/blitz.c8358679.js:35:727409)
at readableAddChunk (https://githubvoetqy-0f5x.w-corp.staticblitz.com/blitz.c8358679.js:35:727113)
at Readable.push (https://githubvoetqy-0f5x.w-corp.staticblitz.com/blitz.c8358679.js:35:727797
Click outside or fix the code to dismiss.
You can also disable this overlay by setting server.hmr.overlay to falsein vite.config.js.
The text was updated successfully, but these errors were encountered:
Closing this one, too. It's actually related to #20370. The interface ends up being empty because Vue 3.2 does not support importing types to use for props. Will be addressed in Vue 3.3.
Environment
Reproduction
https://stackblitz.com/edit/github-voetqy?file=components/VTest.vue
Describe the bug
Trying to define a component's properties using an empty interface that extends another interface fails using
withDefaults(defineProps<Props>(), { ... }
Additional context
Could be an issue in vuejs/core since this and this exist, but it was fixed in Vue 3.2.42 (2022-11-09).
Logs
The text was updated successfully, but these errors were encountered: