Skip to content

Missing undefined for hoverย #63276

@Withered-Flower-0422

Description

@Withered-Flower-0422

๐Ÿ”Ž Search Terms

hover

๐Ÿ•— Version & Regression Information

  • typescript version: 5.9.3 - 6.0.1rc
  • editor: vs code

โฏ Playground Link

No response

๐Ÿ’ป Code

type X = {
    a?: A
    b?: A
    c?: A
}
type A = {}

๐Ÿ™ Actual behavior

When hover on X, it shows:

type X = {
    a?: A | undefined;
    b?: A;
    c?: A;
}

๐Ÿ™‚ Expected behavior

It's expected to show:

type X = {
    a?: A | undefined;
    b?: A | undefined;
    c?: A | undefined;
}

Additional information about the issue

Of course option exactOptionalPropertyTypes set to false.

And tsgo version works well (though there's no line break format yet):

type X = { a?: A | undefined; b?: A | undefined; c?: A | undefined; }

Metadata

Metadata

Assignees

No one assigned

    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