reactjs / reactjs/react-docgen
export types or interfaces from another files
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 3.8k
- Forks
- 316
- Ø Merge
- 5 Std. 7 Min.
- Gemergte PRs (30 T.)
- 4
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, das Problem anhand der Beispiele file1 und file2 zu reproduzieren, und verfolge dann, wie react-docgen Komponenten- und Typinformationen aus importierten Interfaces extrahiert. Ermittle die erwartete Darstellung für verschachtelte Interfaces und deren Implementierungen. Die Arbeit ist abgeschlossen, wenn die angeforderten exportierten Typinformationen in der generierten Bibliotheksausgabe verfügbar sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- react, typescript
- Bereich
- documentation, tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100