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

Components with native DOM events type check error since upgrading to 1.0.0 #1948

Closed
TerryXu-97 opened this issue Oct 8, 2022 · 13 comments
Closed

Comments

@TerryXu-97
Copy link

Components with native DOM events(like input, change) volar(v1.0.0) type check error
Type '(value: string)=>void' cannot be assigned to type '(payload: Event)=>void'. The types of parameters' value 'and' payload 'are incompatible.

@kevinzhao2233
Copy link

I also met.

@mortal-nf
Copy link

俺也一样

@icepole-jon
Copy link

+1

  <van-nav-bar
    :title="title"
    :left-arrow="showBack"
    left-text="返回"
    style="--van-nav-bar-z-index: 99"
    fixed
    placeholder
    @click-left="onBack"
    @click-right="onExport"
  />

placeholder has ts error HTMLAttributes.placeholder?: undefined

@liubaicai
Copy link

俺也一样

@kevinzhao2233
Copy link

There will still be type errors after trying many methods, such as deleting node_modules and lock file, reinstalling depends, and upgrading vue-tsc.
I finally rolled back volar and vue-tsc, deleted node_modules and lock file and reinstalled depends. That is to say, it can't be used normally until it is completely rolled back to the previous version.

@weifeiyue
Copy link

The same +1

@weifeiyue
Copy link

tsconfig.json里面,设置了"types": ["miniprogram-api-typings"],直接导致typescript推导全部失效了

@weifeiyue
Copy link

There will still be type errors after trying many methods, such as deleting node_modules and lock file, reinstalling depends, and upgrading vue-tsc. I finally rolled back volar and vue-tsc, deleted node_modules and lock file and reinstalled depends. That is to say, it can't be used normally until it is completely rolled back to the previous version.

The same +1

@weifeiyue
Copy link

The same +1

@weifeiyue
Copy link

everythings is broken down

@mosaicmask
Copy link

My question is:
@click绑定事件后会报错:不能将类型“($event: any) => void”分配给类型“MouseEvent”。ts(2322)
The error disappears after disabling the Volar plugin
image
Let's see if it's my problem

@lesonky
Copy link

lesonky commented Oct 10, 2022

There will still be type errors in code-insiders

@fy5220
Copy link

fy5220 commented Oct 10, 2022

same issue

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

9 participants