2.10.1
macOS Mojave
2.6.10
### Reproduction Link
-
Install Typescript 3.7. Run a project with element ui.
To build properly
Running the dev environment breaks on Typescript 3.7 with the error below
ERROR in /Users/project/node_modules/element-ui/types/cascader.d.ts(3,10):
3:10 Import declaration conflicts with local declaration of 'CascaderOption'.
1 | import { VNode } from 'vue';
2 | import { ElementUIComponent, ElementUIComponentSize } from './component'
> 3 | import { CascaderOption, CascaderProps, CascaderNode } from './cascader-panel';
| ^
4 |
5 | export type CascaderOption = CascaderOption
6 |
ERROR in /Users/project/node_modules/element-ui/types/cascader.d.ts(3,26):
3:26 Import declaration conflicts with local declaration of 'CascaderProps'.
1 | import { VNode } from 'vue';
2 | import { ElementUIComponent, ElementUIComponentSize } from './component'
> 3 | import { CascaderOption, CascaderProps, CascaderNode } from './cascader-panel';
| ^
4 |
5 | export type CascaderOption = CascaderOption
6 |
ERROR in /Users/project/node_modules/element-ui/types/cascader.d.ts(3,41):
3:41 Import declaration conflicts with local declaration of 'CascaderNode'.
1 | import { VNode } from 'vue';
2 | import { ElementUIComponent, ElementUIComponentSize } from './component'
> 3 | import { CascaderOption, CascaderProps, CascaderNode } from './cascader-panel';
| ^
4 |
5 | export type CascaderOption = CascaderOption
6 |
Same issue.
希望尽快解决
This is already fixed in the dev
branch, when can we expect a release ?
also happens in version 2.12.0
@salvadordiaz I solved the problem with you solution:
`import { CascaderOption as CascaderOption2 , CascaderProps as CascaderProps2 , CascaderNode as CascaderNode} from './cascader-panel';
export type CascaderOption = CascaderOption2
export type CascaderProps
export type CascaderNode
`
Thank you very much!
It was fixed here https://github.com/ElemeFE/element/commit/d15b778826870954c7ae0afe54a707d97ae212e9
But no new release yet
@troy351 so when please? it's a critical bug
I am also wondering
------------------ Original ------------------
From: Shlomi Levi <[email protected]>
Date: Fri,Nov 15,2019 9:53 PM
To: ElemeFE/element <[email protected]>
Cc: troy351 <[email protected]>, Mention <[email protected]>
Subject: Re: [ElemeFE/element] [Bug Report] Typescript 3.7 declaration conflicts (#17994)
i have same issue
@island205 @ziyoung Could you please publish a release for this bug now?
我几乎无法开始开发,为什么不发布?没人维护了吗
我几乎无法开始开发,为什么不发布?没人维护了吗
you could downgrade typescript in your package.json to 3.5.3 until new elementui version released
我几乎无法开始开发,为什么不发布?没人维护了吗
you could downgrade typescript in your package.json to 3.5.3 until new elementui version released
thanks for your reply,I will try this
change typescript version to 3.5.3 works for me, thx~~
wait for new elementui version released😆
将 typescript 降至3.5.3 确实可以解决,但是不完美啊 😂
下个月能解决吗,或者先发个小版本,已经开始用3.7里面的构建特性了。
{
"extends": "./node_modules/loca-boot-common/lib/config/tsconfig.json",
"compilerOptions": {
"skipLibCheck": true,
"baseUrl": ".",
"rootDir": ".",
"rootDirs": [
"src",
"tests"
]
}
},
"references": [
{ "path": "packages/cmp-biz-core"},
{ "path": "packages/cmp-biz-common"},
{ "path": "packages/resourceComponent" },
{ "path": "packages/wscComponent" }
],
"include": [
"src//.ts",
"src//.tsx",
"src//.vue",
"tests//.ts"
],
"exclude": [
"node_modules/**",
]
}
目前暂时用skipLibCheck 解决了。如果没有packages子包会好解决一些,我项目里面很多packages子包,最后把整个项目也移动到了package里面,可以直接被引用了。
目前解决了我的问题。
I just forked the element repo and tagged a "release" of the v2.12.0 with the fix for typescript 3.7 compatibility cherry-picked from the current dev branch.
If you want to use it in your project while the element team cuts a true release. You can replace the element-ui dependency declaration in your package.json with
"element-ui":"https://github.com/hyperlex/element#v2.12.0-tsfix"
No support will be provided, use it only if your project must be compatible with typescript 3.7 and you absolutely cannot wait for the official release containing the fix.
We will release version 2.13.0 to fix this problem at next Tuesday.
问下发布了吗,在线等
问下发布了吗,在线等
问下发布了吗,在线等
We will release version 2.13.0 to fix this problem at next Tuesday.
哥,Tuesday了,请问今天几点会发呢
Element 2.13.0 已发布
Most helpful comment
We will release version 2.13.0 to fix this problem at next Tuesday.