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

key results in type error when used on functional component #268

Closed
yyx990803 opened this issue Jun 14, 2021 · 2 comments
Closed

key results in type error when used on functional component #268

yyx990803 opened this issue Jun 14, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@yyx990803
Copy link
Member

Example:

<script setup lang="ts">
function Foo(props: { x?: number }) {
  return 'hi'
}
</script>

<template>
  <Foo :key="1" />
</template>
@johnsoncodehk
Copy link
Member

It is designed to give full control by user. Currently you need define props type as { [key: string]: unknown, x?: number }, see #227.

@johnsoncodehk
Copy link
Member

After some digging, I just found IntrinsicAttributes should be include to props type, will resolve it.

@johnsoncodehk johnsoncodehk added the bug Something isn't working label Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants