reactjs / reactjs/react-docgen
export types or interfaces from another files
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.8k
- Forks
- 316
- Avg merge
- 5h 7m
- Merged PRs (30d)
- 4
Description
file1
import * as React from 'react'
export interface interface1{
name: string
type?: string
}
export class Component1 extends React.Component<IconProps> {}
file2
import * as React from 'react'
import {interface1} from './file1'
export interface interface2{
value: string
type?: interface1
}
export class Component2 extends React.Component<IconProps> {}
the problem I have is that I have nested types and I can't get the types from the library only it give me the names of it .
is there any way to do this ?
I wonder also if I can export interfaces or types from the file not only the component if I can do this I can map unique name to its implementation.
Contributor guide
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 by reproducing the issue with the file1 and file2 examples, then trace how react-docgen extracts component and type information from imported interfaces. Determine the expected representation for nested interfaces and their implementations; the work is done when the requested exported type information is available from the generated library output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- documentation, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100