Conform more code to strictNullChecks and noImplicitAny (#11156)

This commit is contained in:
Michael Telatynski 2023-06-28 14:05:36 +01:00 committed by GitHub
parent 46eb34a55d
commit 6836a5fa7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 36 additions and 19 deletions

View file

@ -17,7 +17,7 @@ limitations under the License.
import React from "react";
import { render, screen, fireEvent, act } from "@testing-library/react";
import { mocked } from "jest-mock";
import { MatrixClient } from "matrix-js-sdk/src/matrix";
import { MatrixClient, Room } from "matrix-js-sdk/src/matrix";
import UnwrappedSpacePanel from "../../../../src/components/views/spaces/SpacePanel";
import { MatrixClientPeg } from "../../../../src/MatrixClientPeg";
@ -28,6 +28,7 @@ import { mkStubRoom, wrapInSdkContext } from "../../../test-utils";
import { SdkContextClass } from "../../../../src/contexts/SDKContext";
import SpaceStore from "../../../../src/stores/spaces/SpaceStore";
import DMRoomMap from "../../../../src/utils/DMRoomMap";
import { SpaceNotificationState } from "../../../../src/stores/notifications/SpaceNotificationState";
// DND test utilities based on
// https://github.com/colinrobertbrooks/react-beautiful-dnd-test-utils/issues/18#issuecomment-1373388693
@ -98,8 +99,8 @@ jest.mock("../../../../src/stores/spaces/SpaceStore", () => {
enabledMetaSpaces: MetaSpace[] = [];
spacePanelSpaces: string[] = [];
activeSpace: SpaceKey = "!space1";
getChildSpaces = () => [];
getNotificationState = () => null;
getChildSpaces = () => [] as Room[];
getNotificationState = () => null as SpaceNotificationState | null;
setActiveSpace = jest.fn();
moveRootSpace = jest.fn();
}