refactor: fix typescript strict flag failures in all tests (#30993)
Fixes all TypeScript failures caused by enabling the `--strict` flag for test source files. We also want to enable the strict options for tests as the strictness enforcement improves the overall codehealth, unveiled common issues and additionally it allows us to enable `strict` in the `tsconfig.json` that is picked up by IDE's. PR Close #30993
This commit is contained in:

committed by
Miško Hevery

parent
69a612d402
commit
647d7bdd88
@ -288,7 +288,7 @@ import {MockPushManager, MockPushSubscription, MockServiceWorkerContainer, MockS
|
||||
mock.sendMessage({type, data: {message}});
|
||||
|
||||
const receivedMessages: string[] = [];
|
||||
push.messages.subscribe((msg: {message: string}) => receivedMessages.push(msg.message));
|
||||
push.messages.subscribe((msg: any) => receivedMessages.push(msg.message));
|
||||
|
||||
sendMessage('PUSH', 'this was a push message');
|
||||
sendMessage('NOTPUSH', 'this was not a push message');
|
||||
|
@ -27,7 +27,7 @@ export class MockServiceWorkerContainer {
|
||||
private onMessage: Function[] = [];
|
||||
mockRegistration: MockServiceWorkerRegistration|null = null;
|
||||
controller: MockServiceWorker|null = null;
|
||||
messages = new Subject();
|
||||
messages = new Subject<any>();
|
||||
notificationClicks = new Subject();
|
||||
|
||||
addEventListener(event: 'controllerchange'|'message', handler: Function) {
|
||||
|
Reference in New Issue
Block a user