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

@ -16,8 +16,7 @@ limitations under the License.
import React, { createRef, KeyboardEvent } from "react";
import classNames from "classnames";
import { EventStatus, IContent, MatrixEvent, Room } from "matrix-js-sdk/src/matrix";
import { MsgType } from "matrix-js-sdk/src/@types/event";
import { EventStatus, IContent, MatrixEvent, Room, MsgType } from "matrix-js-sdk/src/matrix";
import { logger } from "matrix-js-sdk/src/logger";
import { Composer as ComposerEvent } from "@matrix-org/analytics-events/types/typescript/Composer";

View file

@ -17,8 +17,10 @@ limitations under the License.
import React, { createRef, forwardRef, MouseEvent, ReactNode, useRef } from "react";
import classNames from "classnames";
import { EventType, MsgType, RelationType } from "matrix-js-sdk/src/@types/event";
import {
EventType,
MsgType,
RelationType,
EventStatus,
MatrixEvent,
MatrixEventEvent,

View file

@ -28,11 +28,11 @@ import {
RoomStateEvent,
User,
UserEvent,
JoinRule,
EventType,
} from "matrix-js-sdk/src/matrix";
import { throttle } from "lodash";
import { JoinRule } from "matrix-js-sdk/src/@types/partials";
import { ClientEvent } from "matrix-js-sdk/src/client";
import { EventType } from "matrix-js-sdk/src/@types/event";
import { _t } from "../../../languageHandler";
import dis from "../../../dispatcher/dispatcher";

View file

@ -16,8 +16,7 @@ limitations under the License.
*/
import React from "react";
import { RoomMember, RoomStateEvent, MatrixEvent } from "matrix-js-sdk/src/matrix";
import { EventType } from "matrix-js-sdk/src/@types/event";
import { RoomMember, RoomStateEvent, MatrixEvent, EventType } from "matrix-js-sdk/src/matrix";
import { DeviceInfo } from "matrix-js-sdk/src/crypto/deviceinfo";
import { CryptoEvent } from "matrix-js-sdk/src/crypto";
import { UserTrustLevel } from "matrix-js-sdk/src/crypto/CrossSigning";

View file

@ -16,8 +16,7 @@ limitations under the License.
import React, { createRef, ReactNode } from "react";
import classNames from "classnames";
import { IEventRelation, MatrixEvent, Room, RoomMember } from "matrix-js-sdk/src/matrix";
import { EventType } from "matrix-js-sdk/src/@types/event";
import { IEventRelation, MatrixEvent, Room, RoomMember, EventType } from "matrix-js-sdk/src/matrix";
import { Optional } from "matrix-events-sdk";
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";

View file

@ -15,9 +15,8 @@ limitations under the License.
*/
import React, { useContext } from "react";
import { EventType } from "matrix-js-sdk/src/@types/event";
import { EventType, Room, User } from "matrix-js-sdk/src/matrix";
import { MatrixClient } from "matrix-js-sdk/src/client";
import { Room, User } from "matrix-js-sdk/src/matrix";
import MatrixClientContext from "../../../contexts/MatrixClientContext";
import RoomContext from "../../../contexts/RoomContext";

View file

@ -16,9 +16,8 @@ limitations under the License.
*/
import React from "react";
import { MatrixEvent } from "matrix-js-sdk/src/matrix";
import { MatrixEvent, EventType, RelationType } from "matrix-js-sdk/src/matrix";
import { Relations } from "matrix-js-sdk/src/models/relations";
import { EventType, RelationType } from "matrix-js-sdk/src/@types/event";
import dis from "../../../dispatcher/dispatcher";
import { Action } from "../../../dispatcher/actions";

View file

@ -16,8 +16,7 @@ limitations under the License.
import React, { createRef } from "react";
import classNames from "classnames";
import { MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/matrix";
import { EventType, MsgType } from "matrix-js-sdk/src/@types/event";
import { MatrixEvent, MatrixEventEvent, EventType, MsgType } from "matrix-js-sdk/src/matrix";
import { logger } from "matrix-js-sdk/src/logger";
import { _t } from "../../../languageHandler";

View file

@ -15,8 +15,7 @@ limitations under the License.
*/
import React, { FC } from "react";
import { Room } from "matrix-js-sdk/src/matrix";
import { JoinRule } from "matrix-js-sdk/src/@types/partials";
import { Room, JoinRule } from "matrix-js-sdk/src/matrix";
import { MatrixClient } from "matrix-js-sdk/src/client";
import { _t } from "../../../languageHandler";

View file

@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { EventType, RoomType } from "matrix-js-sdk/src/@types/event";
import { Room } from "matrix-js-sdk/src/matrix";
import { EventType, RoomType, Room } from "matrix-js-sdk/src/matrix";
import React, { ComponentType, createRef, ReactComponentElement, SyntheticEvent } from "react";
import { IState as IRovingTabIndexState, RovingTabIndexProvider } from "../../../accessibility/RovingTabIndex";

View file

@ -14,9 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { EventType, RoomType } from "matrix-js-sdk/src/@types/event";
import { EventType, RoomType, Room, RoomEvent } from "matrix-js-sdk/src/matrix";
import { ClientEvent } from "matrix-js-sdk/src/client";
import { Room, RoomEvent } from "matrix-js-sdk/src/matrix";
import React, { useContext, useEffect, useState } from "react";
import MatrixClientContext from "../../../contexts/MatrixClientContext";

View file

@ -15,10 +15,8 @@ limitations under the License.
*/
import React, { ChangeEvent, ReactNode } from "react";
import { Room, RoomMember } from "matrix-js-sdk/src/matrix";
import { Room, RoomMember, EventType, RoomType, IJoinRuleEventContent, JoinRule } from "matrix-js-sdk/src/matrix";
import { MatrixError } from "matrix-js-sdk/src/http-api";
import { EventType, RoomType } from "matrix-js-sdk/src/@types/event";
import { IJoinRuleEventContent, JoinRule } from "matrix-js-sdk/src/@types/partials";
import classNames from "classnames";
import { RoomPreviewOpts, RoomViewLifecycle } from "@matrix-org/react-sdk-module-api/lib/lifecycles/RoomViewLifecycle";

View file

@ -15,8 +15,7 @@ limitations under the License.
*/
import React, { FC, useContext, useState } from "react";
import { Room } from "matrix-js-sdk/src/matrix";
import { JoinRule } from "matrix-js-sdk/src/@types/partials";
import { Room, JoinRule } from "matrix-js-sdk/src/matrix";
import { _t } from "../../../languageHandler";
import defaultDispatcher from "../../../dispatcher/dispatcher";

View file

@ -16,9 +16,17 @@ limitations under the License.
import React, { createRef, KeyboardEvent, SyntheticEvent } from "react";
import EMOJI_REGEX from "emojibase-regex";
import { IContent, MatrixEvent, IEventRelation, IMentions, Room } from "matrix-js-sdk/src/matrix";
import {
IContent,
MatrixEvent,
IEventRelation,
IMentions,
Room,
EventType,
MsgType,
RelationType,
} from "matrix-js-sdk/src/matrix";
import { DebouncedFunc, throttle } from "lodash";
import { EventType, MsgType, RelationType } from "matrix-js-sdk/src/@types/event";
import { logger } from "matrix-js-sdk/src/logger";
import { Composer as ComposerEvent } from "@matrix-org/analytics-events/types/typescript/Composer";
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";

View file

@ -15,9 +15,8 @@ limitations under the License.
*/
import React from "react";
import { MatrixEvent, Room, RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { MatrixEvent, Room, RoomStateEvent, EventType } from "matrix-js-sdk/src/matrix";
import { logger } from "matrix-js-sdk/src/logger";
import { EventType } from "matrix-js-sdk/src/@types/event";
import { MatrixClientPeg } from "../../../MatrixClientPeg";
import { _t } from "../../../languageHandler";