fix(docs-infra): don't render a return type on constructor signatures by MeAkib · Pull Request #70577 · angular/angular · GitHub
Skip to content

fix(docs-infra): don't render a return type on constructor signatures - #70577

Open
MeAkib wants to merge 1 commit into
angular:mainfrom
MeAkib:fix-docs-infra-constructor-return-type
Open

fix(docs-infra): don't render a return type on constructor signatures#70577
MeAkib wants to merge 1 commit into
angular:mainfrom
MeAkib:fix-docs-infra-constructor-return-type

Conversation

@MeAkib

@MeAkib MeAkib commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

The API reference code block built every class member signature with a return type, so constructors were rendered as invalid TypeScript:

class ActivationStart {
    constructor(snapshot: ActivatedRouteSnapshot): ActivationStart;
}

Constructors are extracted as regular method entries whose return type is the class itself, so getMethodCodeLine now omits the return type when the member is a constructor, for both the single signature and the overloaded cases:

class ActivationStart {
  constructor(snapshot: ActivatedRouteSnapshot);
}

What is the current behavior?

https://angular.dev/api/router/ActivationStart

The API reference code block built every class member signature with a
return type, so constructors were rendered as invalid TypeScript:

  class ActivationStart {
    constructor(snapshot: ActivatedRouteSnapshot): ActivationStart;
  }

Constructors are extracted as regular method entries whose return type is
the class itself, so `getMethodCodeLine` now omits the return type when
the member is a constructor, for both the single signature and the
overloaded cases:

  class ActivationStart {
    constructor(snapshot: ActivatedRouteSnapshot);
  }
@pullapprove
pullapprove Bot requested a review from crisbeto September 5, 2026 03:00
@angular-robot angular-robot Bot added the area: docs-infra Angular.dev application and infrastructure label Sep 5, 2026
@ngbot ngbot Bot added this to the Backlog milestone Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs-infra Angular.dev application and infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant