Skip to content

[TypeScript] SyntaxError on array destructuring #10066

@jaejun-choi

Description

@jaejun-choi

Bug Report

Current Behavior
SyntaxError: Unexpected type cast in parameter position

Input Code

[x as Foo] = arr

Expected behavior/code
no error

Babel Configuration (.babelrc, package.json, cli command)
@babel/parser with typescript plugin

Environment

  • Babel version(s): 7.4.5
  • Node/npm version: Node 11.13 / npm 6.7

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions