Skip to content

[TypeScript 3.7] declare modifier on class fields #6661

@thorn0

Description

@thorn0

see microsoft/TypeScript#33509

Prettier 1.18.2
Playground link

--parser typescript

Input:

class C extends B {
  declare p: 25
}

Output:

class C extends B {
  p: 25;
}

Expected behavior:

same as the input

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang: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.scope:dependencyIssues that cannot be solved inside Prettier itself, and must be fixed in a dependency

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions