Skip to content

out of range index in a tuple magically works #5203

Closed
@zpdDG4gta8XKpMCd

Description

@zpdDG4gta8XKpMCd
var x : [number, number] = [1, 2];
var y = x[2]; // expected a compile error, actual ok

By design, isn't it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    CommittedThe team has roadmapped this issueGood First IssueWell scoped, documented and has the green lightHelp WantedYou can do thisSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions