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
However while playing around with compiler-sfc I noticed that when a component has more than one root element (within the <template/> definition the function is passed the Fragment as a type.
Then (obviously) when running TSC over the generated render function, I get a TS2345 error Argument of type '{ new (): { $props: VNodeProps; }; __isFragment: true; }' is not assignable to parameter of type 'string'.
Hello, thank you for taking time filling this issue!
However, we kindly ask you to use our Issue Helper when creating new issues, in order to ensure every issue provides the necessary information for us to investigate. This explains why your issue has been automatically closed by me (your robot friend!).
I hope to see your helper-created issue very soon!
https://github.com/vuejs/vue-next/blob/6db15a27cf0040f95b21ccfff86799c021231efc/packages/runtime-core/src/vnode.ts#L289
The definition for
createElementBlock
reads:However while playing around with
compiler-sfc
I noticed that when a component has more than one root element (within the<template/>
definition the function is passed theFragment
as a type.Then (obviously) when running TSC over the generated
render
function, I get aTS2345
errorArgument of type '{ new (): { $props: VNodeProps; }; __isFragment: true; }' is not assignable to parameter of type 'string'.
This seems to be also reflected in the tests (e.g. see https://github.com/vuejs/vue-next/blob/ceff89905b05381d3d73c480e08c7aff9271b074/packages/compiler-core/__tests__/__snapshots__/compile.spec.ts.snap#L17) so I don't know why it doesn't seem to be caught.
I assume the correct type for the
type
parameter should beVNodeTypes
???@HcySunYang this was in your #3334...
The text was updated successfully, but these errors were encountered: