Skip to content

[mat-dialog]: Proposal to add type safety for dialog result value #8834

Closed
@reppners

Description

@reppners

Bug, feature request, or proposal:

Proposal

What is the expected behavior?

Type safety for MatDialog result values.

What is the current behavior?

No generic type in the signature of MatDialogRef to support typing the expected return value.
This makes dialog result handling error prone.

What is the use-case or motivation for changing an existing behavior?

Improve type safety by getting rid of any on dialog result values.

Introduce a second generic parameter on MatDialogRef<TComponent, TResult> that enables to be more specific on the type of the dialog result value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions