Skip to content

[Bug]stricter Generators: T not in scope #32507

Closed
@kgtkr

Description

@kgtkr

TypeScript Version: 3.6.0-dev.20190720

Search Terms:
Generators

Code

function* foo(): {
  next<T>(x: T): IteratorResult<void, void>;
} {
  // x: T
  const x = yield;
}

Expected behavior:
It is necessary to discuss how it should work

Actual behavior:
x: T

Related Issues:
#30790 #31639

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDesign LimitationConstraints of the existing architecture prevent this from being fixedWorking as IntendedThe behavior described is the intended behavior; this is not a bug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions