Skip to content

Proposal to make MatOption (its value) typed #19456

Closed
@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/corefeatureThis issue represents a new feature or feature request rather than a bug or bug fix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions