Switch to importing @types/{event,partials} from main js-sdk export (#11369)

This commit is contained in:
Michael Telatynski 2023-08-08 11:12:12 +01:00 committed by GitHub
parent 368b6b9355
commit 033c600fa2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
125 changed files with 217 additions and 244 deletions

View file

@ -17,8 +17,7 @@ limitations under the License.
import React from "react";
import { fireEvent, render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { RoomType } from "matrix-js-sdk/src/@types/event";
import { MatrixClient, MatrixError, Room } from "matrix-js-sdk/src/matrix";
import { RoomType, MatrixClient, MatrixError, Room } from "matrix-js-sdk/src/matrix";
import { sleep } from "matrix-js-sdk/src/utils";
import { mocked, Mocked } from "jest-mock";

View file

@ -17,8 +17,17 @@ limitations under the License.
import React from "react";
import { render, act, RenderResult, fireEvent, waitForElementToBeRemoved, screen } from "@testing-library/react";
import { mocked } from "jest-mock";
import { MatrixEvent, RoomStateEvent, IEvent, Room, EventTimelineSet, IMinimalEvent } from "matrix-js-sdk/src/matrix";
import { EventType, RelationType, MsgType } from "matrix-js-sdk/src/@types/event";
import {
MatrixEvent,
RoomStateEvent,
IEvent,
Room,
EventTimelineSet,
IMinimalEvent,
EventType,
RelationType,
MsgType,
} from "matrix-js-sdk/src/matrix";
import { M_POLL_KIND_DISCLOSED } from "matrix-js-sdk/src/@types/polls";
import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
import { PollResponseEvent } from "matrix-js-sdk/src/extensible_events_v1/PollResponseEvent";

View file

@ -17,9 +17,8 @@ limitations under the License.
import * as React from "react";
import { render, waitFor, screen, act, fireEvent } from "@testing-library/react";
import { mocked } from "jest-mock";
import { EventType } from "matrix-js-sdk/src/@types/event";
import { EventType, CryptoApi, TweakName, NotificationCountType, Room, MatrixEvent } from "matrix-js-sdk/src/matrix";
import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client";
import { CryptoApi, TweakName, NotificationCountType, Room, MatrixEvent } from "matrix-js-sdk/src/matrix";
import { DeviceTrustLevel, UserTrustLevel } from "matrix-js-sdk/src/crypto/CrossSigning";
import { DeviceInfo } from "matrix-js-sdk/src/crypto/deviceinfo";
import { IEncryptedEventInfo } from "matrix-js-sdk/src/crypto/api";

View file

@ -17,8 +17,7 @@ limitations under the License.
import React from "react";
import { render, screen, act, fireEvent, waitFor, getByRole, RenderResult } from "@testing-library/react";
import { mocked, Mocked } from "jest-mock";
import { EventType, RoomType } from "matrix-js-sdk/src/@types/event";
import { Room, RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { EventType, RoomType, Room, RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { PendingEventOrdering } from "matrix-js-sdk/src/client";
import { CallType } from "matrix-js-sdk/src/webrtc/call";
import { ClientWidgetApi, Widget } from "matrix-widget-api";

View file

@ -16,8 +16,7 @@ limitations under the License.
import React from "react";
import { MatrixClient } from "matrix-js-sdk/src/client";
import { Room } from "matrix-js-sdk/src/matrix";
import { EventType } from "matrix-js-sdk/src/@types/event";
import { Room, EventType } from "matrix-js-sdk/src/matrix";
import { mocked } from "jest-mock";
import { act, render, screen, fireEvent, RenderResult } from "@testing-library/react";

View file

@ -18,8 +18,7 @@ import React from "react";
import { mocked, Mocked } from "jest-mock";
import { render, screen, act } from "@testing-library/react";
import { PendingEventOrdering } from "matrix-js-sdk/src/client";
import { Room, RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { RoomType } from "matrix-js-sdk/src/@types/event";
import { Room, RoomStateEvent, RoomType } from "matrix-js-sdk/src/matrix";
import type { MatrixClient } from "matrix-js-sdk/src/client";
import type { RoomMember } from "matrix-js-sdk/src/matrix";

View file

@ -15,8 +15,7 @@ limitations under the License.
*/
import * as React from "react";
import { MatrixEvent, Room } from "matrix-js-sdk/src/matrix";
import { EventType } from "matrix-js-sdk/src/@types/event";
import { MatrixEvent, Room, EventType } from "matrix-js-sdk/src/matrix";
import { render, type RenderResult } from "@testing-library/react";
import { stubClient } from "../../../test-utils";

View file

@ -16,7 +16,7 @@ limitations under the License.
import React, { ComponentProps } from "react";
import { fireEvent, render } from "@testing-library/react";
import { PUSHER_ENABLED } from "matrix-js-sdk/src/@types/event";
import { PUSHER_ENABLED } from "matrix-js-sdk/src/matrix";
import DeviceDetails from "../../../../../src/components/views/settings/devices/DeviceDetails";
import { mkPusher } from "../../../../test-utils/test-utils";

View file

@ -17,8 +17,7 @@ limitations under the License.
import React from "react";
import { fireEvent, render, RenderResult, screen } from "@testing-library/react";
import { MatrixClient } from "matrix-js-sdk/src/client";
import { EventType } from "matrix-js-sdk/src/@types/event";
import { MatrixEvent, Room, RoomMember } from "matrix-js-sdk/src/matrix";
import { EventType, MatrixEvent, Room, RoomMember } from "matrix-js-sdk/src/matrix";
import { mocked } from "jest-mock";
import RolesRoomSettingsTab from "../../../../../../src/components/views/settings/tabs/room/RolesRoomSettingsTab";

View file

@ -17,9 +17,7 @@ limitations under the License.
import React from "react";
import { fireEvent, render, RenderResult, waitFor } from "@testing-library/react";
import { MatrixClient } from "matrix-js-sdk/src/client";
import { Room, MatrixEvent } from "matrix-js-sdk/src/matrix";
import { EventType } from "matrix-js-sdk/src/@types/event";
import { JoinRule } from "matrix-js-sdk/src/@types/partials";
import { Room, MatrixEvent, EventType, JoinRule } from "matrix-js-sdk/src/matrix";
import { mkStubRoom, stubClient } from "../../../../../test-utils";
import { MatrixClientPeg } from "../../../../../../src/MatrixClientPeg";

View file

@ -18,8 +18,7 @@ import React from "react";
import { mocked } from "jest-mock";
import { randomString } from "matrix-js-sdk/src/randomstring";
import { act, fireEvent, render, RenderResult } from "@testing-library/react";
import { EventType, MatrixClient, Room } from "matrix-js-sdk/src/matrix";
import { GuestAccess, HistoryVisibility, JoinRule } from "matrix-js-sdk/src/@types/partials";
import { EventType, MatrixClient, Room, GuestAccess, HistoryVisibility, JoinRule } from "matrix-js-sdk/src/matrix";
import _SpaceSettingsVisibilityTab from "../../../../src/components/views/spaces/SpaceSettingsVisibilityTab";
import {