Skip to content

feat(snack-bar): MdSnackBarRef can't get proper type #3010

@igortd

Description

@igortd

Bug, feature request, or proposal:

Proposal

What is the expected behavior?

Write the expected type for MdSnackBarRef

What is the current behavior?

You have to define the type as any

What are the steps to reproduce?

This:

let snackBarRef = snackBar.open('Message archived');

cannot be written like this:

let snackBarRef: MdSnackBarRef<SimpleSnackBar> = snackBar.open('Message archived');

because there is no import for SimpleSnackBar

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

It is more convenient for code writing in TypeScript if the variable type is known.

Which versions of Angular, Material, OS, browsers are affected?

All

Metadata

Metadata

Assignees

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