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

Compile error with vue-tsc v2.2.0 and typescript v5.7 #3403

Open
1 task done
Gaojianli opened this issue Dec 30, 2024 · 1 comment
Open
1 task done

Compile error with vue-tsc v2.2.0 and typescript v5.7 #3403

Gaojianli opened this issue Dec 30, 2024 · 1 comment

Comments

@Gaojianli
Copy link

基本信息

预期结果

compile success

复现步骤

Upgrade typescript to 5.7.2 and vue-tsc to 2.2.0, components with a-form will got an error:

error TS2742: The inferred type of 'default' cannot be named without a reference to '.pnpm/scroll-into-view-if-needed@2.2.31/node_modules/scroll-into-view-if-needed'. This is likely not portable. A type annotation is necessary.

370 export default (await import('vue')).defineComponent({
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
371 setup() {
    ~~~~~~~~~
... 
375 __typeRefs: {} as __VLS_TemplateResult['refs'],
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
376 });
    ~~~
@backunderstar
Copy link

backunderstar commented Jan 22, 2025

同样的问题出现在typescript 5.6.3 vue-tsc 2.2.0
使用表单校验调用formRef.value.validate()时,resetFields()同,错误信息同上文。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants