Skip to content
This repository was archived by the owner on Sep 1, 2026. It is now read-only.
This repository was archived by the owner on Sep 1, 2026. It is now read-only.

Assertion in JSX spread causes missing newline in JS output #3971

Closed

Description

Steps to reproduce

const c = <EntryTextDialog
    {...{
        first: 0,
        foo: 1,
        bar: 2 as any,
        baz: 3,
        last: 4
    }}
/>

Playground Link

Behavior with typescript@6.0

const c = _jsx(EntryTextDialog, { first: 0,
    foo: 1,
    bar: 2,
    baz: 3,
    last: 4 });

Behavior with tsgo

Newlines are removed before and after the property with the assertion (not others)

const c = _jsx(EntryTextDialog, { first: 0,
    foo: 1, bar: 2, baz: 3,
    last: 4 });

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions