react-component / react-component/tree
Seeing type issue with latest upgrade for estree types
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 490
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 5
Description
I'm getting the error below when I'm upgrading types in my antd implementation:
- "@types/estree": "^1.0.1",
+ "@types/estree": "^1.0.4",
There seems to be a typing issue with the latest library
node_modules/antd/node_modules/rc-tree/lib/interface.d.ts:59:70 - error TS2344: Type 'DateType' does not satisfy the constraint 'BasicDataNode'.
59 export type KeyEntities<DateType = any> = Record<SafeKey, DataEntity<DateType>>;
~~~~~~~~
node_modules/antd/node_modules/rc-tree/lib/interface.d.ts:59:25
59 export type KeyEntities<DateType = any> = Record<SafeKey, DataEntity<DateType>>;
~~~~~~~~~~~~~~
This type parameter might need an `extends BasicDataNode` constraint.
BasicDataNode is a type from estree
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported upgrade from @types/estree ^1.0.1 to ^1.0.4 in an antd implementation and inspect node_modules/antd/node_modules/rc-tree/lib/interface.d.ts at the KeyEntities type. Compare the installed type definitions and confirm the issue is resolved when the TypeScript check completes without the BasicDataNode constraint error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100