build: TypeScript 3.5 upgrade (#31615)
https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#typescript-35 PR Close #31615
This commit is contained in:
@ -151,7 +151,7 @@ function joinUrls(a: string, b: string): string {
|
||||
}
|
||||
|
||||
function withOrderedKeys<T extends{[key: string]: any}>(unorderedObj: T): T {
|
||||
const orderedObj = {} as T;
|
||||
const orderedObj = {} as{[key: string]: any};
|
||||
Object.keys(unorderedObj).sort().forEach(key => orderedObj[key] = unorderedObj[key]);
|
||||
return orderedObj;
|
||||
return orderedObj as T;
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ import {take} from 'rxjs/operators';
|
||||
scope.clients.getMock('default') !.queue.subscribe(msg => { mock.sendMessage(msg); });
|
||||
|
||||
mock.messages.subscribe(msg => { scope.handleMessage(msg, 'default'); });
|
||||
mock.notificationClicks.subscribe(msg => { scope.handleMessage(msg, 'default'); });
|
||||
mock.notificationClicks.subscribe((msg: Object) => { scope.handleMessage(msg, 'default'); });
|
||||
|
||||
mock.setupSw();
|
||||
reg = mock.mockRegistration !;
|
||||
|
@ -28,7 +28,7 @@ export class MockServiceWorkerContainer {
|
||||
mockRegistration: MockServiceWorkerRegistration|null = null;
|
||||
controller: MockServiceWorker|null = null;
|
||||
messages = new Subject<any>();
|
||||
notificationClicks = new Subject();
|
||||
notificationClicks = new Subject<{}>();
|
||||
|
||||
addEventListener(event: 'controllerchange'|'message', handler: Function) {
|
||||
if (event === 'controllerchange') {
|
||||
|
Reference in New Issue
Block a user