Skip to content

A bug where a null value is assigned when specifying a null type. #18905

@stegano

Description

@stegano

TypeScript Version: Version 2.6.0-dev.20170930

Code

let x : number | null;
let y : null | number;
let z : string | number | null;

Expected behavior:

let x;
let y;
let z;

Actual behavior:

let x = null;
let y = null | number;
let z = null;

A bug where subsequent strings of type null are assigned as values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ExternalRelates to another program, environment, or user action which we cannot control.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions