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

VueJS 3.5 TSX emits types broken #11803

Closed
tcastelly opened this issue Sep 4, 2024 · 0 comments
Closed

VueJS 3.5 TSX emits types broken #11803

tcastelly opened this issue Sep 4, 2024 · 0 comments

Comments

@tcastelly
Copy link

tcastelly commented Sep 4, 2024

Vue version

3.5

Link to minimal reproduction

https://github.com/shenron/vite-demo/tree/vue-3.5

Steps to reproduce

npm run lint

TSX and events

Previously the emit property in the defineComponent enable in TSX a property with the same name prefixed by on

export const emits = {
  customClick /* <-- */: (args: string) => typeof args === 'string',
} as const;

export default defineComponent({
  name: 'HelloWorld',
  inheritAttrs: false,
  props,
  emits,
  setup,
  render,
});
<HelloWorld
  onCustomClick={console.log} /* <-  'onCustomClick' does not exist on type 'IntrinsicAttributes & Partial<{ rea .... */
/>

use case: https://github.com/shenron/vite-demo/blob/vue-3.5/src/app/useRender.tsx#L40

What is expected?

Same behavior as the previous version of Vue

What is actually happening?

Few false positive errors are trigger

System Info

No response

Any additional comments?

No response

@tcastelly tcastelly changed the title VueJS 3.5 Types broken VueJS 3.5 TSX emits types broken Sep 4, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants