reactjs / reactjs/react-docgen
Better support for custom types
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
This is more of a "would you be willing to accept a pull request which does this?" question than an issue of sorts. :)
I would really like to extend the functionality of "custom" types so that:
- We support destructured imports (Eg.
PropTypes.array- note the lack ofReact.) - We allow common react-esque prop type function patterns to be picked up with custom props in the same way that
arrayOfis currently handled. (Eg.PropTypes.iterableOf(PropTypes.record(User)))
Basically I feel the library should be able to support custom user prop types in such a way we don't have to reparse the raw value which would mean anyone can easily implement simple custom prop types and create documentation from that.
Custom prop types are super useful in building a real-world app with React and so I would like to see how we can help developers document these too.
We, at Lystable, want to build an open living component docs solution and are hoping react-docgen can feature at the core!
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
Es wird keine Datei, kein Test und kein Einstiegspunkt genannt. Beginne damit, die bestehende Verarbeitung von custom prop-type und den Codepfad zu finden, der arrayOf verarbeitet, und ermittle anschließend, wie destrukturierte Importe und verschachtelte benutzerdefinierte Funktionen dargestellt werden. Erledigt ist die Aufgabe, wenn beide angeforderten Muster dokumentiert sind, ohne den Rohwert erneut zu parsen, und eine Abdeckung für die angegebenen Beispiele vorhanden ist.
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
- Größtenteils klar
- Anfängerfreundlichkeit
- 20/100