Skip to content

ArrowFunctionExpression returning ObjectPattern prints without parens when a return type is removed #1067

@conartist6

Description

@conartist6

I've created a minimal repro for this behavior here: https://github.com/conartist6/recast-arrow-object-pattern-repro

The input is:

(): Type => ({ prop: true });

and the output is invalid, as it is missing parens:

() => { prop: true };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions