Skip to content

Feature request: typescript 4 labeled tuple support #912

Description

@3axap4eHko

It's not really clear when defining a tuple without any name

type UserInfo = [string, number, boolean]
function getUserInfo(): UserInfo

from the lua side it looks much clear

local username, age, isRegistered = getUserInfo()

Since typescript 4 supports labeled tuple, it would be great to have them as

type UserInfo = [username: string, age: number, isRegistered: boolean];

Link to the announcement https://devblogs.microsoft.com/typescript/announcing-typescript-4-0-beta/#labeled-tuple-elements

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions