Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 033c600

Browse files
authored
Switch to importing @types/{event,partials} from main js-sdk export (#11369)
1 parent 368b6b9 commit 033c600

File tree

125 files changed

+217
-244
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+217
-244
lines changed

.eslintrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ module.exports = {
102102
name: "matrix-js-sdk/src/models/event-timeline-set",
103103
message: "Please use matrix-js-sdk/src/matrix instead",
104104
},
105+
{
106+
name: "matrix-js-sdk/src/@types/partials",
107+
message: "Please use matrix-js-sdk/src/matrix instead",
108+
},
109+
{
110+
name: "matrix-js-sdk/src/@types/event",
111+
message: "Please use matrix-js-sdk/src/matrix instead",
112+
},
105113
{
106114
name: "matrix-react-sdk",
107115
message: "Please use matrix-react-sdk/src/index instead",

cypress/e2e/room/room.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ limitations under the License.
1616

1717
/// <reference types="cypress" />
1818

19-
import { EventType } from "matrix-js-sdk/src/@types/event";
19+
import { EventType } from "matrix-js-sdk/src/matrix";
2020

2121
import { HomeserverInstance } from "../../plugins/utils/homeserver";
2222
import { MatrixClient } from "../../global";

src/ContentMessages.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ limitations under the License.
1717
*/
1818

1919
import { MatrixClient } from "matrix-js-sdk/src/client";
20-
import { MsgType } from "matrix-js-sdk/src/@types/event";
21-
import encrypt from "matrix-encrypt-attachment";
22-
import extractPngChunks from "png-chunks-extract";
23-
import { IImageInfo } from "matrix-js-sdk/src/@types/partials";
24-
import { logger } from "matrix-js-sdk/src/logger";
2520
import {
21+
MsgType,
22+
IImageInfo,
2623
HTTPError,
2724
IEventRelation,
2825
ISendEventResponse,
2926
MatrixEvent,
3027
UploadOpts,
3128
UploadProgress,
3229
} from "matrix-js-sdk/src/matrix";
30+
import encrypt from "matrix-encrypt-attachment";
31+
import extractPngChunks from "png-chunks-extract";
32+
import { logger } from "matrix-js-sdk/src/logger";
3333
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
3434
import { removeElement } from "matrix-js-sdk/src/utils";
3535

src/Searching.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ import {
2323
SearchOrderBy,
2424
} from "matrix-js-sdk/src/@types/search";
2525
import { IRoomEventFilter } from "matrix-js-sdk/src/filter";
26-
import { EventType } from "matrix-js-sdk/src/@types/event";
26+
import { EventType, MatrixClient } from "matrix-js-sdk/src/matrix";
2727
import { SearchResult } from "matrix-js-sdk/src/models/search-result";
28-
import { MatrixClient } from "matrix-js-sdk/src/matrix";
2928

3029
import { ISearchArgs } from "./indexing/BaseEventIndexManager";
3130
import EventIndexPeg from "./indexing/EventIndexPeg";

src/SlidingSyncManager.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ limitations under the License.
4444
* list ops)
4545
*/
4646

47-
import { MatrixClient } from "matrix-js-sdk/src/matrix";
48-
import { EventType } from "matrix-js-sdk/src/@types/event";
47+
import { MatrixClient, EventType } from "matrix-js-sdk/src/matrix";
4948
import {
5049
MSC3575Filter,
5150
MSC3575List,

src/TextForEvent.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,17 @@ limitations under the License.
1515
*/
1616

1717
import React from "react";
18-
import { MatrixEvent, MatrixClient } from "matrix-js-sdk/src/matrix";
18+
import {
19+
MatrixEvent,
20+
MatrixClient,
21+
GuestAccess,
22+
HistoryVisibility,
23+
JoinRule,
24+
EventType,
25+
MsgType,
26+
} from "matrix-js-sdk/src/matrix";
1927
import { logger } from "matrix-js-sdk/src/logger";
2028
import { removeDirectionOverrideChars } from "matrix-js-sdk/src/utils";
21-
import { GuestAccess, HistoryVisibility, JoinRule } from "matrix-js-sdk/src/@types/partials";
22-
import { EventType, MsgType } from "matrix-js-sdk/src/@types/event";
2329
import { M_POLL_START, M_POLL_END } from "matrix-js-sdk/src/@types/polls";
2430
import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
2531

src/components/structures/LegacyCallEventGrouper.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
import { EventType } from "matrix-js-sdk/src/@types/event";
18-
import { MatrixEvent } from "matrix-js-sdk/src/matrix";
17+
import { EventType, MatrixEvent } from "matrix-js-sdk/src/matrix";
1918
import { CallEvent, CallState, CallType, MatrixCall } from "matrix-js-sdk/src/webrtc/call";
2019
import { EventEmitter } from "events";
2120

src/components/structures/LoggedInView.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@ limitations under the License.
1616

1717
import React, { ClipboardEvent } from "react";
1818
import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client";
19-
import { MatrixEvent, RoomStateEvent, MatrixError } from "matrix-js-sdk/src/matrix";
19+
import { MatrixEvent, RoomStateEvent, MatrixError, IUsageLimit } from "matrix-js-sdk/src/matrix";
2020
import { MatrixCall } from "matrix-js-sdk/src/webrtc/call";
2121
import classNames from "classnames";
2222
import { ISyncStateData, SyncState } from "matrix-js-sdk/src/sync";
23-
import { IUsageLimit } from "matrix-js-sdk/src/@types/partials";
2423

2524
import { isOnlyCtrlOrCmdKeyEvent, Key } from "../../Keyboard";
2625
import PageTypes from "../../PageTypes";

src/components/structures/MatrixChat.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ import {
2323
MatrixClient,
2424
MatrixEventEvent,
2525
MatrixEvent,
26+
RoomType,
2627
} from "matrix-js-sdk/src/matrix";
2728
import { ISyncStateData, SyncState } from "matrix-js-sdk/src/sync";
2829
import { InvalidStoreError } from "matrix-js-sdk/src/errors";
2930
import { defer, IDeferred, QueryDict } from "matrix-js-sdk/src/utils";
3031
import { logger } from "matrix-js-sdk/src/logger";
3132
import { throttle } from "lodash";
3233
import { CryptoEvent } from "matrix-js-sdk/src/crypto";
33-
import { RoomType } from "matrix-js-sdk/src/@types/event";
3434
import { DecryptionError } from "matrix-js-sdk/src/crypto/algorithms";
3535
import { IKeyBackupInfo } from "matrix-js-sdk/src/crypto/keybackup";
3636

src/components/structures/MessagePanel.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ limitations under the License.
1717
import React, { createRef, ReactNode, TransitionEvent } from "react";
1818
import ReactDOM from "react-dom";
1919
import classNames from "classnames";
20-
import { Room, MatrixClient, RoomStateEvent, EventStatus, MatrixEvent } from "matrix-js-sdk/src/matrix";
21-
import { EventType } from "matrix-js-sdk/src/@types/event";
20+
import { Room, MatrixClient, RoomStateEvent, EventStatus, MatrixEvent, EventType } from "matrix-js-sdk/src/matrix";
2221
import { logger } from "matrix-js-sdk/src/logger";
2322
import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon";
2423
import { isSupportedReceiptType } from "matrix-js-sdk/src/utils";

0 commit comments

Comments
 (0)