Skip to content
New issue

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

[vue-tsc] Type error for component after updating to 1.4 #2638

Closed
augustjk opened this issue Apr 21, 2023 · 1 comment
Closed

[vue-tsc] Type error for component after updating to 1.4 #2638

augustjk opened this issue Apr 21, 2023 · 1 comment
Labels
bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first

Comments

@augustjk
Copy link

Repro: https://stackblitz.com/edit/vitejs-vite-xv9dk6?file=src/App.vue

Given

<script setup lang="ts">
import { h } from 'vue';

const test = () => {
  return h('p', {}, 'test');
};
</script>

<template>
  <test />
</template>

Build of this fails with

src/App.vue:10:4 - error TS2554: Expected 0 arguments, but got 1.
10   <test />
      ~~~~

This used to work in 1.3.
While this can be alleviated by giving const test a param, I don't know if this is supposed to be erroring here in the first place.

@augustjk augustjk changed the title Type error for component after updating to 1.4 [vue-tsc] Type error for component after updating to 1.4 Apr 21, 2023
@johnsoncodehk johnsoncodehk added bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first labels Apr 21, 2023
@xue-lei
Copy link

xue-lei commented Apr 21, 2023

I also have the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first
Projects
None yet
Development

No branches or pull requests

3 participants