microsoft / microsoft/TypeScript
Version 5.0.4 -> 5.1.3 Regression when using generic types
Aperta
@weswigham ci sta già lavorando.
Dal 28/6/2023.
Bug
Domain: check: Type Inference
Rescheduled
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.4k
- Merge medio
- 1g 19h
- PR unite (30g)
- 117
Descrizione
Bug Report
🔎 Search Terms
Generic, 5.1.3
🕗 Version & Regression Information
- This changed between versions 5.0.4 and 5.1.3
⏯ Playground Link
💻 Code
type LexicalCommand<TPayload> = Record<string, never>;
type InsertTextPayload = Readonly<{ text: string }>;
function createCommand<T>(): LexicalCommand<T> {
return {};
}
const INSERT_TEXT_COMMAND: LexicalCommand<InsertTextPayload> =
createCommand();
🙁 Actual behavior
The type of INSERT_TEXT_COMMAND is LexicalCommand<TPayload> in 5.1.3 (but LexicalCommand<InsertTextPayload> in 5.0.4).
🙂 Expected behavior
The type of INSERT_TEXT_COMMAND should be LexicalCommand<InsertTextPayload>.
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.
Valutazione
Questa issue non è ancora stata valutata.