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

error TS2430: Interface 'IntrinsicElements' incorrectly extends interface 'NativeElements'. #1102

Closed
zhengxs2018 opened this issue May 2, 2020 · 4 comments

Comments

@zhengxs2018
Copy link

Version

3.0.0-beta.6

Reproduction link

https://github.com/zhengxs2018/vue-next-ui-templates

Steps to reproduce

我准备做一个 vue 3.x 的 ui 脚手架,这个错误很烦,真的

执行 npm 命令就可以看到问题了

Execute the NPM command to see:

yarn watch

What is expected?

0 error(s), 0 warning(s)

What is actually happening?

node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts(1408,15): error TS2430: Interface 'IntrinsicElements' incorrectly extends interface 'NativeElements'.
[watch:ts] Types of property 'symbol' are incompatible.
[watch:ts] Type 'SVGProps' is not assignable to type 'ElementAttrs'.
[watch:ts] Type 'SVGProps' is not assignable to type 'SVGAttributes'.
[watch:ts] Types of property 'autoReverse' are incompatible.
[watch:ts] Type 'boolean | "false" | "true" | undefined' is not assignable to type 'string | number | undefined'.
[watch:ts] Type 'false' is not assignable to type 'string | number | undefined'.
[watch:ts]
[watch:ts] 14:22:18 - Found 16 errors. Watching for file changes.

image


在 monorepo 工程下,如果给多个 package 引入这个模块,还会出现重复定义的问题,难搞啊

In the monorepo project, if this module is introduced to multiple packages, there will be the problem of repeated definitions, which is a bit difficult to handle

The following is not a problem, no need to read:

  1. 有人知道现在这么挂载全局模块么?
  2. vue 3 有人开始准备强上项目了,期待分享
@milewski
Copy link

milewski commented Jun 9, 2020

Wo ye you zhege wenti.. you ren zhidao zenme bang?

@zhengxs2018
Copy link
Author

@milewski 你有毒,打拼音,弄的我一愣一愣的,使用 ts-ignore 可以先解决

@milewski
Copy link

... I have added "skipLibCheck": true, temporarily to my tsconfig.json until this issue is sorted out

@haoqunjiang
Copy link
Member

Seems you are using Storybook. According to this issue in the Storybook repository: storybookjs/storybook#17290, it's already fixed in Storybook 7.0.
If you are still experiencing this issue after updating the dependencies, please open a new issue with an updated reproduction. Thanks for reporting!

@github-actions github-actions bot locked and limited conversation to collaborators Sep 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants