Skip to content

Commit dd65ae7

Browse files
authored
Fix TODOs (firebase#1787)
1 parent a80cf4e commit dd65ae7

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

packages/messaging/src/controllers/base-controller.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,7 @@ export abstract class BaseController implements FirebaseMessaging {
337337
* Returns the current Notification Permission state.
338338
*/
339339
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;
344341
}
345342

346343
getTokenDetailsModel(): TokenDetailsModel {

packages/messaging/src/controllers/sw-controller.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,8 @@ export class SwController extends BaseController {
108108
const notificationTitle = notificationDetails.title || '';
109109
const reg = await this.getSWRegistration_();
110110

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;
116113
// tslint:enable no-any
117114
if (actions && maxActions && actions.length > maxActions) {
118115
console.warn(

0 commit comments

Comments
 (0)