Skip to content

consider syntax for tuple literals: (['a', 2]) // [string, number] #9217

Closed
@zpdDG4gta8XKpMCd

Description

Problem

There is no way to get a tuple value without explicit type annotation:

var tuple = ['hey', 1]; // (string|number)[]

Solution

Add new syntax for tuple literals:

var tuple = (['hey', 1]); // [string, number]

related #9216

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