Skip to content

Comments preserved in declaration files #1737

@dragomirtitian

Description

@dragomirtitian

Steps to reproduce

// Comment
export class DbObject {
    // Comment
    id: string = ""; // Comment
    // Comment
    method() { }
}

Playground Link

Behavior with typescript@5.8

Non jsdoc comments are removed from declaration files

Behavior with tsgo

Non jsdoc comments are preserved in declaration files

Metadata

Metadata

Assignees

Labels

Domain: Declaration EmitRelated to declaration emit, type printingDomain: EmitRelated to emit, AST printing, Program emit funcs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions