Skip to content

Regresion in 3.9: Forcing TSTypeParameterInstantiation with TSMappedType to break #19505

Description

@fisker

Prettier v3.9.4
Playground link

--parser typescript

Input:

createObject<{
        // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type -- ignore
        [key in keyof Function]: TypeInfo | null
    }>

Output:

createObject<
  {
    // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type -- ignore
    [key in keyof Function]: TypeInfo | null;
  }
>;

Expected output:

createObject<{
  // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type -- ignore
  [key in keyof Function]: TypeInfo | null
}>

Why?

Metadata

Metadata

Assignees

Labels

lang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions