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] False positive type check for method arguments with defineExpose #1364

Closed
ahnpnl opened this issue May 29, 2022 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@ahnpnl
Copy link
Contributor

ahnpnl commented May 29, 2022

Summary

vue-tsc shows false positive type check for this piece of codes

<script setup lang="ts">

interface Bar {
    foo(bar: string): void;
}

defineExpose<Bar>({
    foo(bar) {
        console.log('foo', bar);
    }
})
</script>

The error is error TS7006: Parameter 'bar' implicitly has an 'any' type.

This bug happens since 0.34.15+

Reproduce repo

Expectation

The error should not be there.

@johnsoncodehk johnsoncodehk added the bug Something isn't working label May 30, 2022
@Tarrowren
Copy link

I've found that I still have this bug on 1.8.16, and the version of vue I'm using now is 2.7.14

@so1ve
Copy link
Member

so1ve commented Oct 7, 2023

@Tarrowren Open a new issue.

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

4 participants