-
-
Notifications
You must be signed in to change notification settings - Fork 415
Description
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.