diff --git a/src/@types/global.d.ts b/src/@types/global.d.ts index 71c0c87b815..d7e7c76ac2d 100644 --- a/src/@types/global.d.ts +++ b/src/@types/global.d.ts @@ -29,20 +29,11 @@ declare global { namespace NodeJS { interface Global { - localStorage: Storage; // marker variable used to detect both the browser & node entrypoints being used at once __js_sdk_entrypoint: unknown; } } - interface Window { - webkitAudioContext: typeof AudioContext; - } - - interface Crypto { - webkitSubtle?: Window["crypto"]["subtle"]; - } - interface MediaDevices { // This is experimental and types don't know about it yet // https://github.com/microsoft/TypeScript/issues/33232 @@ -76,40 +67,4 @@ declare global { // on webkit: we should check if we still need to do this webkitGetUserMedia: DummyInterfaceWeShouldntBeUsingThis; } - - export interface ISettledFulfilled { - status: "fulfilled"; - value: T; - } - export interface ISettledRejected { - status: "rejected"; - reason: any; - } - - interface PromiseConstructor { - allSettled(promises: Promise[]): Promise | ISettledRejected>>; - } - - interface RTCRtpTransceiver { - // This has been removed from TS - // (https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1029), - // but we still need this for MatrixCall::getRidOfRTXCodecs() - setCodecPreferences(codecs: RTCRtpCodecCapability[]): void; - } - - interface RequestInit { - /** - * Specifies the priority of the fetch request relative to other requests of the same type. - * Must be one of the following strings: - * high: A high priority fetch request relative to other requests of the same type. - * low: A low priority fetch request relative to other requests of the same type. - * auto: Automatically determine the priority of the fetch request relative to other requests of the same type (default). - * - * @see https://html.spec.whatwg.org/multipage/urls-and-fetching.html#fetch-priority-attribute - * @see https://github.com/microsoft/TypeScript/issues/54472 - * @see https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#browser_compatibility - * Not yet supported in Safari or Firefox - */ - priority?: "high" | "low" | "auto"; - } } diff --git a/src/crypto/algorithms/base.ts b/src/crypto/algorithms/base.ts index 37dae34bd77..2dda6e91efa 100644 --- a/src/crypto/algorithms/base.ts +++ b/src/crypto/algorithms/base.ts @@ -66,7 +66,6 @@ export abstract class EncryptionAlgorithm { protected readonly crypto: Crypto; protected readonly olmDevice: OlmDevice; protected readonly baseApis: MatrixClient; - protected readonly roomId?: string; /** * @param params - parameters @@ -77,7 +76,6 @@ export abstract class EncryptionAlgorithm { this.crypto = params.crypto; this.olmDevice = params.olmDevice; this.baseApis = params.baseApis; - this.roomId = params.roomId; } /** @@ -127,14 +125,12 @@ export abstract class DecryptionAlgorithm { protected readonly crypto: Crypto; protected readonly olmDevice: OlmDevice; protected readonly baseApis: MatrixClient; - protected readonly roomId?: string; public constructor(params: DecryptionClassParams) { this.userId = params.userId; this.crypto = params.crypto; this.olmDevice = params.olmDevice; this.baseApis = params.baseApis; - this.roomId = params.roomId; } /**