Skip to content

Tuple types accepting incorrect data #19463

@deregtd

Description

@deregtd

TypeScript Version: 2.6.0-rc

Code

let a: [string] = ['a', 'b'];

Expected behavior:
Error: [string, string] is not compatible with [string].

Actual behavior:
Compiles A-ok

Metadata

Metadata

Assignees

Labels

FixedA PR has been merged for this issueSuggestionAn idea for TypeScript

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions