Skip to content

Incorrect error of use of unassigned variable #13811

Closed
@NN---

Description

@NN---

TypeScript Version: 2.1.5
strictNullChecks: true

Code

let a: {};

if (!a) { // <!-- Error
   ....
}

Expected behavior:
Code compiles fine.

Actual behavior:
Use of unassigned variable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions