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

[Regression] Pass type as input type for function doesn't infer the correct type #1165

ahnpnl opened this issue Apr 11, 2022 · 0 comments
bug Something isn't working


Copy link

ahnpnl commented Apr 11, 2022


I have this sample code

<script setup lang="ts">
interface Foo {
    callMe(option: number): void;

    callMe(option) {

Starting from 0.34.3 onwards, I got the error

error TS7006: Parameter 'option' implicitly has an 'any' type.

1 <template>

This error is not correct because option here is auto inferred type as number.

The bug doesn't happen with <= 0.34.2

Reproduce repo

@ahnpnl ahnpnl changed the title [Regression] Auto infer type for defineExpose no longer works [Regression] Pass type as input type for function doesn't infer the correct type Apr 11, 2022
@johnsoncodehk johnsoncodehk added the bug Something isn't working label Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
bug Something isn't working
None yet

No branches or pull requests

2 participants