microsoft / microsoft/TypeScript
GeneratorFunction should not be newable
Aperta
@rbuckton ci sta già lavorando.
Dal 4/12/2023.
Needs Investigation
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.4k
- Merge medio
- 1g 19h
- PR unite (30g)
- 117
Descrizione
⚙ Compilation target
ES2015 ES2018
⚙ Library
generator asyncgenerator
Missing / Incorrect Definition
GeneratorFunction and AsyncGeneratorFunction (async function * () {}) should not be newable.
GeneratorFunction means function * () {} which is only callable, while GeneratorFunctionConstructor means function * () {}.constructor which is both callable and newable.
Sample Code
declare const gen: GeneratorFunction;
new gen;// there should cause a type error, but not
Documentation Link
No response
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.