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

Fallthrough attributes not recognized #1384

Closed
DhivinX opened this issue Jun 3, 2022 · 2 comments
Closed

Fallthrough attributes not recognized #1384

DhivinX opened this issue Jun 3, 2022 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@DhivinX
Copy link

DhivinX commented Jun 3, 2022

Hi,

after the last update, Fallthrough Attributes are no longer recognizable.
https://vuejs.org/guide/components/attrs.html

Simple example here:

Child component:

<template>
    <q-btn @click="clicks++">{{ clicks }}</q-btn>
    <!-- q-btn has color prop -->
</template>

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

const clicks = ref<number>(0);
</script>

Parent component:

<template>
    <CompChild color="red"></CompChild>
</template>

<script setup lang="ts">
import CompChild from './CompChild.vue';
</script>
Type '{ color: string; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<Readonly<ExtractPropTypes<{}>> & 
VNodeProps & AllowedComponentProps & ComponentCustomProps, never>'.
  Property 'color' does not exist on type 'IntrinsicAttributes & Partial<{}> & Omit<Readonly<ExtractPropTypes<{}>> & VNodeProps & 
AllowedComponentProps & ComponentCustomProps, never>'.ts(2322)
@johnsoncodehk
Copy link
Member

See #1077 (comment).

@johnsoncodehk
Copy link
Member

Duplicate of #1383

@johnsoncodehk johnsoncodehk marked this as a duplicate of #1383 Jun 3, 2022
@johnsoncodehk johnsoncodehk added the duplicate This issue or pull request already exists label Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants