Skip to content

Request Feature: Ability to declare optional variable with '?'Β #49477

Closed
@joe88ds

Description

@joe88ds

⭐ Suggestion

Let us declare local variables as optional

πŸ’» Use Cases

const x: Type? = y;
let x: Type?;
and this would translate to:
const x: Type | undefined = y;
let x: Type | undefined = undefined;

πŸ” Search Terms

optional variable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions