Improve quality of Typescript types (#10742)

This commit is contained in:
Michael Telatynski
2023-05-05 09:11:14 +01:00
committed by GitHub
parent 542bf68c63
commit a4f0b80692
30 changed files with 74 additions and 75 deletions
+2 -2
View File
@@ -39,8 +39,8 @@ export enum ActiveWidgetStoreEvent {
*/
export default class ActiveWidgetStore extends EventEmitter {
private static internalInstance: ActiveWidgetStore;
private persistentWidgetId: string | null;
private persistentRoomId: string | null;
private persistentWidgetId: string | null = null;
private persistentRoomId: string | null = null;
private dockedWidgetsByUid = new Map<string, number>();
public static get instance(): ActiveWidgetStore {
+1 -1
View File
@@ -43,7 +43,7 @@ export class OwnProfileStore extends AsyncStoreWithClient<IState> {
return instance;
})();
private monitoredUser: User | null;
private monitoredUser: User | null = null;
private constructor() {
// seed from localstorage because otherwise we won't get these values until a whole network
+1 -1
View File
@@ -28,7 +28,7 @@ export const PROPERTY_UPDATED = "property_updated";
export abstract class GenericEchoChamber<C extends EchoContext, K, V> extends EventEmitter {
private cache = new Map<K, { txn: EchoTransaction; val: V }>();
protected matrixClient: MatrixClient | null;
protected matrixClient: MatrixClient | null = null;
protected constructor(public readonly context: C, private lookupFn: (key: K) => V) {
super();