Skip to content

Proposal to make MatOption (its value) typed #19456

@Wilt

Description

@Wilt

Feature Description

Make MatOption class typed

Use Case

When using MatOption the value is typed any, would be great if it would be possible to make MatOption type specific, could by default be falling back to any:

Proposed solution:

export class MatOption<T = any> implements FocusableOption, AfterViewChecked, OnDestroy {

  //...

  @Input() value: T;

  //...

}

Could provide a PR if that is preferred.

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/corefeatureLabel used to distinguish feature request from other issues

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions