Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
"@babel/preset-env",
{
"targets": {
"node": 10
"node": 18
},
"modules": "commonjs"
"modules": "commonjs",
"include": ["@babel/plugin-proposal-class-properties"]
}
],
"@babel/preset-typescript"
["@babel/preset-typescript", { "allowDeclareFields": true }]
],
"plugins": [
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-runtime"
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/algorithms/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ limitations under the License.
*/

import type { IMegolmSessionData } from "../../@types/crypto";
import type { IContent, MatrixEvent, RoomMember } from "../../matrix";
import { MatrixClient } from "../../client";
import { Room } from "../../models/room";
import { OlmDevice } from "../OlmDevice";
import { IContent, MatrixEvent, RoomMember } from "../../matrix";
import { Crypto, IEncryptedContent, IEventDecryptionResult, IncomingRoomKeyRequest } from "..";
import { DeviceInfo } from "../deviceinfo";
import { IRoomEncryption } from "../RoomList";
Expand Down
4 changes: 2 additions & 2 deletions src/crypto/algorithms/megolm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export class MegolmEncryption extends EncryptionAlgorithm {
cancel: () => void;
};

protected readonly roomId: string;
protected declare readonly roomId: string;
private readonly prefixedLogger: PrefixedLogger;

public constructor(params: IParams & Required<Pick<IParams, "roomId">>) {
Expand Down Expand Up @@ -1290,7 +1290,7 @@ export class MegolmDecryption extends DecryptionAlgorithm {
// this gets stubbed out by the unit tests.
private olmlib = olmlib;

protected readonly roomId: string;
protected declare readonly roomId: string;
private readonly prefixedLogger: PrefixedLogger;

public constructor(params: DecryptionClassParams<IParams & Required<Pick<IParams, "roomId">>>) {
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { SecretStorage as LegacySecretStorage } from "./SecretStorage";
import { CrossSigningKey, ICreateSecretStorageOpts, IEncryptedEventInfo, IRecoveryKey } from "./api";
import { OutgoingRoomKeyRequestManager } from "./OutgoingRoomKeyRequestManager";
import { IndexedDBCryptoStore } from "./store/indexeddb-crypto-store";
import { VerificationBase } from "./verification/Base";
import type { VerificationBase } from "./verification/Base";
import { ReciprocateQRCode, SCAN_QR_CODE_METHOD, SHOW_QR_CODE_METHOD } from "./verification/QRCode";
import { SAS as SASVerification } from "./verification/SAS";
import { keyFromPassphrase } from "./key_passphrase";
Expand Down
4 changes: 2 additions & 2 deletions src/crypto/verification/request/Channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { MatrixEvent } from "../../../models/event";
import { VerificationRequest } from "./VerificationRequest";
import type { MatrixEvent } from "../../../models/event";
import type { VerificationRequest } from "./VerificationRequest";

export interface IVerificationChannel {
request?: VerificationRequest;
Expand Down
2 changes: 1 addition & 1 deletion src/models/room-member.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import type { MatrixEvent } from "./event";
import { getHttpUriForMxc } from "../content-repo";
import { removeDirectionOverrideChars, removeHiddenChars } from "../utils";
import { User } from "./user";
import { MatrixEvent } from "./event";
import { RoomState } from "./room-state";
import { logger } from "../logger";
import { TypedEventEmitter } from "./typed-event-emitter";
Expand Down
2 changes: 1 addition & 1 deletion src/models/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { MatrixEvent } from "./event";
import type { MatrixEvent } from "./event";
import { TypedEventEmitter } from "./typed-event-emitter";

export enum UserEvent {
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import unhomoglyph from "unhomoglyph";
import promiseRetry from "p-retry";
import { Optional } from "matrix-events-sdk";

import { IEvent, MatrixEvent } from "./models/event";
import type { IEvent, MatrixEvent } from "./models/event";
import { M_TIMESTAMP } from "./@types/location";
import { ReceiptType } from "./@types/read_receipts";

Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"useDefineForClassFields": true,
"target": "es2016",
"experimentalDecorators": true,
"esModuleInterop": true,
Expand Down