react-component / react-component/util
Missing type declaration for PortalWrapper
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 670
- Forks
- 205
- Avg merge
- 11d 17h
- Merged PRs (30d)
- 4
Description
rc-util version 5.0.4 (dependency of antd version 4.11.2)
Problem
Missing type declaration triggering TypeScript error on build:
ERROR in [path to app]/node_modules/rc-image/lib/Image.d.ts(2,30):
TS7016: Could not find a declaration file for module 'rc-util/lib/PortalWrapper'. '[path to app]/node_modules/rc-image/node_modules/rc-util/lib/PortalWrapper.js' implicitly has an 'any' type.
Try `npm install @types/rc-util` if it exists or add a new declaration (.d.ts) file containing `declare module 'rc-util/lib/PortalWrapper';`
Solution
Add PortalWrapper.d.ts.
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
Start with rc-image/lib/Image.d.ts and the missing rc-util/lib/PortalWrapper module described in the build error. Add the requested PortalWrapper.d.ts declaration and verify that the TypeScript build no longer reports TS7016 for PortalWrapper.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100