Skip to content

Declaration file generated for destructuring elements is incorrect. #2023

Closed
@sheetalkamat

Description

@sheetalkamat

Destructuing is not handled correctly (either object literal or array binding pattern) in during declaration emit.

Eg.

TypeScript
var { a, b } = { a: "10", b: 10 };


Generates

``` TypeScript```
declare var { a, b }: any;

Expected:

TypeScript
declare var a: string, b: number;

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions