We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.2.4
https://github.com/SebastianSpeitel/vue-bug
npm i npm run build
Template compiles without errors
Build fails with:
semantic error TS2345: Argument of type '{ new (): { $props: VNodeProps; }; __isFragment: true; }' is not assignable to parameter of type 'string'
But ignoring the type-error, the JS output still works.
That's the template:
<template> <div> <span v-for="s in ['a', 'b']" v-text="s"></span> </div> </template> <script setup lang="ts"> const message = "Hello Vue!"; </script> <!-- Works with: <script lang="ts"> export default { setup() { return {}; } }; </script> -->
The diff of the non-setup version and the setup version:
11318,11323d11317 < var script = { < setup() { < return {}; < } < }; < 11324a11319,11332 > var script = defineComponent({ > setup(__props) { > const message = "Hello Vue!"; > return (_ctx, _cache) => { > return (openBlock(), createElementBlock("div", null, [ > (openBlock(), createElementBlock(Fragment, null, renderList(['a', 'b'], (s) => { > return createBaseVNode("span", { > textContent: toDisplayString(s) > }, null, 8 /* PROPS */, _hoisted_1); > }), 64 /* STABLE_FRAGMENT */)) > ])); > }; > } > }); 11326,11336d11333 < function render(_ctx, _cache, $props, $setup, $data, $options) { < return (openBlock(), createElementBlock("div", null, [ < (openBlock(), createElementBlock(Fragment, null, renderList(['a', 'b'], (s) => { < return createBaseVNode("span", { < textContent: toDisplayString(s) < }, null, 8 /* PROPS */, _hoisted_1) < }), 64 /* STABLE_FRAGMENT */)) < ])) < } < < script.render = render;
Probably duplicate of #4390
The text was updated successfully, but these errors were encountered:
createElementBlock
types(runtime-core): fix types of block creation
db2365e
fix: vuejs#4391
fix(types): improve the type of createElementBlock (#4406)
ebd0bac
fix #4391
Successfully merging a pull request may close this issue.
Version
3.2.4
Reproduction link
https://github.com/SebastianSpeitel/vue-bug
Steps to reproduce
What is expected?
Template compiles without errors
What is actually happening?
Build fails with:
But ignoring the type-error, the JS output still works.
That's the template:
The diff of the non-setup version and the setup version:
Probably duplicate of #4390
The text was updated successfully, but these errors were encountered: