react-component / react-component/tabs
import {TabPane} from 'rc-tabs' throws an error in typescript
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 572
- Forks
- 241
- Avg merge
- 4d 18h
- Merged PRs (30d)
- 4
Description
When I import the modules like default
import Tabs, { TabPane } from 'rc-tabs';
The compiler throws an error which says the TabPane module is not available.
TS2614: Module '"rc-tabs"' has no exported member 'TabPane'
It works anyway if I ignore the message, but it keeps throwing this error message every time I make changes in dev environment.
The error happens when I'm using typescript and it goes away when I set this tsconfig parameter to true:
"allowSyntheticDefaultImports": true
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 TypeScript error with import Tabs, { TabPane } from 'rc-tabs' while allowSyntheticDefaultImports is disabled, then inspect the package's exports and type declarations. Done means the named import type-checks without requiring that tsconfig workaround and the existing development workflow no longer reports TS2614.
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
- 35/100