Skip to content

Commit

Permalink
feat(language-core): ignore type error for new functional component (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiyuanzmj authored Jun 8, 2024
1 parent 494c906 commit 89c1036
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/language-core/lib/codegen/template/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ export function* generateComponent(
yield `const ${var_originalComponent} = {} as any${endOfLine}`;
}

yield `// @ts-ignore${newLine}`;
yield `const ${var_functionalComponent} = __VLS_asFunctionalComponent(${var_originalComponent}, new ${var_originalComponent}({`;
yield* generateElementProps(options, ctx, node, props, false);
yield `}))${endOfLine}`;
Expand Down

0 comments on commit 89c1036

Please sign in to comment.