Skip to content

Variable implicitly has type 'any' in some locations where its type cannot be determined in 5.0Β #52401

@jakebailey

Description

@jakebailey

Bug Report

πŸ”Ž Search Terms

locations where its type cannot be determined

πŸ•— Version & Regression Information

  • This changed between versions 4.9 and 5.0

⏯ Playground Link

Playground link with relevant code

πŸ’» Code

let foo;
try {
	if (Math.random() > 0.5) {
		foo = 1234;
	}
} catch {
	foo;
}

πŸ™ Actual behavior

Errors like:

Variable 'foo' implicitly has type 'any' in some locations where its type cannot be determined.(7034)

πŸ™‚ Expected behavior

No errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: check: Control FlowThe issue relates to control flow analysisFixedA PR has been merged for this issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions