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

Component type #196

Closed
sheremet-va opened this issue May 20, 2021 · 2 comments
Closed

Component type #196

sheremet-va opened this issue May 20, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@sheremet-va
Copy link

I have a typing error after the last update inside component:

Argument of type '{ is: "th" | "td"; role: string; align: string | null; }' is not assignable to parameter of type '{ is: "th" | "td"; } & ("th" | "td")'.ts(2345)

My is component is a string:

const el = computed(() => props.header ? 'th' : 'td');
<component
    :is="el"
    role="cell"
    :class="$style.tableCell"
    :align="cellAlign"
    :style="cellStyle"
>

I know I can use render function, but this code works and didn't have any typing errors in the past.

@johnsoncodehk
Copy link
Member

v0.25.8 supported <component :is> type-checking, but unhandled pass string value to :is.

Will fix in next version, thanks to report! You can downgrade to v0.25.7 for now.

@johnsoncodehk johnsoncodehk added the bug Something isn't working label May 20, 2021
@johnsoncodehk
Copy link
Member

Fixed in 0.25.9. And recommend you update this code to get correct type-checking with <component>.

const el = computed(() => props.header ? 'th' as const : 'td' as const);

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