Skip to content

Spec allows missing initializer in destructuring lexical bindings #6785

Closed
@nickie

Description

@nickie

TypeScript's specification seems to allow a missing initializer for destructuring lexical bindings, whereas the EC262 specification does not. Is this intentional? In that case, I believe it should only be allowed in the case that a type annotation is present, e.g., in let [x, y]: number[]; The current playground implementation seems to disallow this.

Metadata

Metadata

Assignees

Labels

SpecIssues related to the TypeScript language specification

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions