File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed
packages/messaging/src/controllers Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -337,10 +337,7 @@ export abstract class BaseController implements FirebaseMessaging {
337
337
* Returns the current Notification Permission state.
338
338
*/
339
339
getNotificationPermission_ ( ) : NotificationPermission {
340
- // TODO: Remove the cast when this issue is fixed:
341
- // https://github.com/Microsoft/TypeScript/issues/14701
342
- // tslint:disable-next-line no-any
343
- return ( Notification as any ) . permission ;
340
+ return Notification . permission ;
344
341
}
345
342
346
343
getTokenDetailsModel ( ) : TokenDetailsModel {
Original file line number Diff line number Diff line change @@ -108,11 +108,8 @@ export class SwController extends BaseController {
108
108
const notificationTitle = notificationDetails . title || '' ;
109
109
const reg = await this . getSWRegistration_ ( ) ;
110
110
111
- // TODO: Remove casts to any and redundant type declarations when this
112
- // PR lands: https://github.com/Microsoft/TSJS-lib-generator/pull/438
113
- // tslint:disable no-any
114
- const actions : object [ ] = ( notificationDetails as any ) . actions ;
115
- const maxActions : number | undefined = ( Notification as any ) . maxActions ;
111
+ const { actions } = notificationDetails ;
112
+ const { maxActions } = Notification ;
116
113
// tslint:enable no-any
117
114
if ( actions && maxActions && actions . length > maxActions ) {
118
115
console . warn (
You can’t perform that action at this time.
0 commit comments