Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Missing type declaration for PortalWrapper

Open
#220 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
50/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
react, typescript
Domain
frontend

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.

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.

Dominant language
TypeScript
Stars
670
Forks
205
Avg merge
15d 17h
Merged PRs (30d)
6

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from react-component/util

All issues in react-component/util

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.