Skip to content

Call signatures in interfaces get broken with no-semi #14040

@thorn0

Description

@thorn0

Prettier 2.8.1
Playground link

--parser typescript
--no-semi

Input:

interface Foo {
  foo,<T>(a: T): T;
}

Output:

interface Foo {
  foo
  <T>(a: T): T
}

Second Output:

interface Foo {
  foo<T>(a: T): T
}

Prettier 2.8.1
Playground link

--parser typescript
--no-semi

Input:

interface Foo {
 a,
 ():x
}

Output:

interface Foo {
  a
  (): x
}

Second Output:

interface Foo {
  a(): x
}

Prettier 2.8.1
Playground link

--parser typescript
--no-semi

Input:

interface Foo {
 get,
 bar():string
}

Output:

interface Foo {
  get
  bar(): string
}

Second Output:

interface Foo {
  get bar(): string
}

Metadata

Metadata

Assignees

Labels

area:no-semilang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions