microsoft / microsoft/TypeScript

Inherited methods not merging JSDoc comments

Open
#63,789 6 comments 1 reaction 0 assignees View on GitHub
Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

## Steps to reproduce

```ts
class Foo {
/** foo bar */
method(): void {}
}

class Bar extends Foo {
/** @remarks lorem ipsum */
method(): void {}
}
```

## Behavior with `typescript@5.9`
Hovering over `Bar#method` gives:
```ts
(method) Bar.method(): void
foo bar
@remarks — lorem ipsum
```

## Behavior with `tsgo`
Hovering over `Bar#method` gives:
```ts
(method) Bar.method(): void
@remarks — lorem ipsum
```

Note that the `foo bar` is gone. I believe that blocks like `@remarks` being merged is a case not handled by microsoft/typescript-go#2111

Contributor guide

Open the contributing guide

Research direction

Start with the TypeScript 5.9 and tsgo reproductions in the issue, then read microsoft/typescript-go#2111 for the related JSDoc merging behavior. Compare inherited method documentation handling, with completion meaning that the `foo bar` text and the `@remarks` block are merged consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, typescript
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.