Interface extends are supported but not the type ampersand syntax
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- typescript
- Ambito
- documentation
Direzione di ricerca
Inizia riproducendo l’esempio TypeScript segnalato, inclusi l’utility Omit e le intersezioni con ampersand, quindi segui il percorso di analisi dei tipi che gestisce interface extends. Controlla i test esistenti per l’estrazione dei tipi TypeScript, se disponibili. Il lavoro è completato quando vengono riconosciute sia la sintassi delle intersezioni sia la definizione basata su Omit mostrata, senza interrompere il comportamento esistente di interface extends.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
If we use types in Typescript that can be extended with ampersand syntax &, it won't work.
For example, we have a pretty funky type definition like this in our repository:
export type ILinkProps = ITypeAgnosticLinkProps &
Omit<INextLinkProps, "children"> & {
/**
* Disables a link, visually and functionally
* @default false
*/
isDisabled?: boolean;
/**
* Sets `target="_blank"` and `rel="noreferrer"` explicitly.
* If props contain `target="_blank"` and `rel="noreferrer"`
* this will be set to isExternal automatically.
* _NOTE:_ This is a pure technical flag, if you're looking for a visual
* representation of an external link, use the `icon` and the `iconPosition` prop.
*/
isExternal?: boolean;
};
First it won't work because of the Omit, but if that would be solved (or deleted), it still doesn't work as the & is not recognized as extends.
- Lingua principale
- TypeScript
- Stelle
- 3.8k
- Fork
- 316
- Merge medio
- 3h 28m
- PR unite (30g)
- 6
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.
Altre issue di reactjs/react-docgen
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
reactjs/react-docgen#1102 ·
-
Typescript Status Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
reactjs/react-docgen#1005 · 4 reazioni ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
reactjs/react-docgen#997 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
reactjs/react-docgen#994 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
reactjs/react-docgen#982 · 2 commenti ·
Tutte le issue di reactjs/react-docgen
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
copse-dev/agent-pane#2953 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Apertabug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
calcite-components needs triage refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Esri/calcite-design-system#15203 ·