Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
igortd opened this issue Feb 9, 2017 · 1 comment · Fixed by #3016
Closed

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

igortd opened this issue Feb 9, 2017 · 1 comment · Fixed by #3016
Assignees

Comments

@igortd
Copy link

igortd commented Feb 9, 2017

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

@igortd igortd changed the title feat(snack-bar): MdSnackBarRef can get proper type feat(snack-bar): MdSnackBarRef can't get proper type Feb 9, 2017
@crisbeto crisbeto self-assigned this Feb 9, 2017
crisbeto added a commit to crisbeto/material2 that referenced this issue Feb 9, 2017
* Fixes the `SimpleSnackBar` class not being exported.
* Moves the `MdSnackBarModule` to the `index.ts` for consistency with other modules.

Fixes angular#3010.
@crisbeto crisbeto added the has pr label Feb 9, 2017
tinayuangao pushed a commit that referenced this issue Feb 9, 2017
* Fixes the `SimpleSnackBar` class not being exported.
* Moves the `MdSnackBarModule` to the `index.ts` for consistency with other modules.

Fixes #3010.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants