reactjs / reactjs/react-docgen
Nested type descriptions
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 3.8k
- Fork
- 316
- Merge medio
- 5h 7m
- PR unite (30g)
- 4
Descrizione
Sorry if this has been reported before in some form before, but is there currently support for nested type descriptions? For example, given the following structure (using Flow and react-docgen@5.3.1):
type Panel = {
/** Panel title */
title: string,
/** Panel content */
content: string,
/** Sublevels of more Panels */
panels: Array<Panel>
};
type Props = {
/** One or more toggleable Panels */
panels: Array<Panel>
}
/** Hello World! */
const Component = (props: Props) => { ... }
^ Does not generate any description for the Panel -props. Is this intentional? The output for a Panel is:
{
"name": "signature",
"type": "object",
"raw": "{ ... }",
"signature": {
"properties": [
{
"key": "title",
"value": {
"name": "string",
"required": true
}
},
{
"key": "content",
"value": {
"name": "string",
"required": true
}
},
{
"key": "panels",
"value": {
"name": "Array",
"elements": [{ "name": "Panel" }],
"raw": "Array<Panel>",
"required": true
}
}
]
}
}
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo l'esempio Flow dell'issue con react-docgen@5.3.1 e ispeziona la firma generata per Panel. Nel report non sono indicati file sorgente né test; il lavoro è completo quando le proprietà annidate di Panel conservano le loro descrizioni nell'output generato, con copertura per la struttura mostrata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- react, typescript
- Ambito
- documentation, frontend
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100