Skip to content

tuple type don't check number of elements #5259

Closed
@co-dh

Description

The following compiles,

    var foo:[string, string] = ['','', '', '']

while this one not:

    var foo:[string, string] = ['','', '', 1]

The first one should not compiles, since the initializer has 3 elements while the type says 2.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

BugA bug in TypeScriptBy DesignDeprecated - use "Working as Intended" or "Design Limitation" instead

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions