Compilation errors with TypeScript 4.8.x
jljouannic opened this issue ยท 12 comments
jljouannic commented
After upgrading typescript to version 4.8.2, I get the following compilation errors running tsc on my project:
node_modules/.pnpm/rc-tree@5.6.7_biqbaboplfbrettd7655fr4n2y/node_modules/rc-tree/lib/NodeList.d.ts:15:23 - error TS2344: Type 'TreeDataType' does not satisfy the constraint 'BasicDataNode'.
15 data: FlattenNode<TreeDataType>[];
~~~~~~~~~~~~
node_modules/.pnpm/rc-tree@5.6.7_biqbaboplfbrettd7655fr4n2y/node_modules/rc-tree/lib/NodeList.d.ts:12:25
12 interface NodeListProps<TreeDataType> {
~~~~~~~~~~~~
This type parameter might need an `extends BasicDataNode` constraint.
node_modules/.pnpm/rc-tree@5.6.7_biqbaboplfbrettd7655fr4n2y/node_modules/rc-tree/lib/NodeList.d.ts:18:29 - error TS2344: Type 'TreeDataType' does not satisfy the constraint 'BasicDataNode'.
18 activeItem: FlattenNode<TreeDataType>;
~~~~~~~~~~~~
node_modules/.pnpm/rc-tree@5.6.7_biqbaboplfbrettd7655fr4n2y/node_modules/rc-tree/lib/NodeList.d.ts:12:25
12 interface NodeListProps<TreeDataType> {
~~~~~~~~~~~~
This type parameter might need an `extends BasicDataNode` constraint.
Found 2 errors in 1 file.
Errors Files
1 node_modules/.pnpm/rc-tree@5.6.7_biqbaboplfbrettd7655fr4n2y/node_modules/rc-tree/lib/NodeList.d.ts:15Environment:
- react 18.2.0,
- antd 4.23.0,
- typescript 4.8.2.
Sagie501 commented
Same for me. For know I just downgrade typescript to 4.7.4.
I think that the solution is pretty simple, just make TreeDataType extends BasicDataNode.
evan976 commented
The same problem, how did you solve it?
fnimick commented
@MadCcc heads up - this problem is now resolved if you want to make a new release ๐
andreas-soroko commented
can this be released or is something blocking?
0x1af2aec8f957 commented
kaiyoma commented
Why is this still not fixed? We can't upgrade TypeScript or Ant until this is fixed, and it's been almost two months. Please make a new release!
kaiyoma commented
Version 5.7.1 has been released and fixes the type checking issues.