Skip to content

[BUG] Support for input<T>() Input Signals Missing or Incomplete #1576

@imike57

Description

@imike57

Description

In modern Angular applications (v17+), signals-based inputs are commonly declared using the input<T>() utility function from @angular/core. For example:

export class ButtonComponent {
  public size = input<"sm" | "lg">("sm");
}

While this syntax works correctly in TypeScript and editors like VS Code, inferring the type as:

(property) ButtonComponent.size: InputSignal<"lg" | "sm">

Compodoc fails to correctly document the actual type. In the current output, the type is often missing, appears as input<>, or is otherwise incomplete, which prevents accurate or helpful documentation from being generated.


✅ Expected Behavior

Compodoc should correctly resolve and display the inferred type:

size: InputSignal<"lg" | "sm">

This matches what developers see in their IDEs and ensures the documentation remains trustworthy and usable.


💡 Suggested Implementation

It may be possible to improve type inference for properties and methods, especially those initialized with functions like input<T>() , maybe by looking into how tools like VS Code achieve such accurate type resolution.

This would improve accuracy and provide a much better developer experience for teams adopting Angular Signals and the new inputs API.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions