-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Open
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: check: Type InferenceRelated to type inference performed during signature resolution or `infer` type resolutionRelated to type inference performed during signature resolution or `infer` type resolutionHelp WantedYou can do thisYou can do this
Milestone
Description
Bug Report
π Search Terms
no implicit any, generator, yield, destructure
#41348 - Report implicit any error for 'yield' result with no contextual type
π Version & Regression Information
TypeScript 4.2.3
β― Playground Link
Playground link with relevant code
π» Code
function* sample() {
const a = yield 1 // error, as expected, a is implicitly any
const { b } = yield 1 // no error, but expected, b is implicitly any
const [c] = yield 1 // no error, but expected, c is implicitly any
}π Actual behavior
b, c implicitly have type any, but no error reported
π Expected behavior
Errors reported
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: check: Type InferenceRelated to type inference performed during signature resolution or `infer` type resolutionRelated to type inference performed during signature resolution or `infer` type resolutionHelp WantedYou can do thisYou can do this