From 9688a561b37edb7531a76ca3fa59cf872b4b9aa9 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Thu, 18 Nov 2021 17:13:30 +0530 Subject: [PATCH] Move interface to common.ts --- src/matrix/net/{common.js => common.ts} | 8 ++++++++ src/platform/types/Platform.ts | 9 +-------- 2 files changed, 9 insertions(+), 8 deletions(-) rename src/matrix/net/{common.js => common.ts} (90%) diff --git a/src/matrix/net/common.js b/src/matrix/net/common.ts similarity index 90% rename from src/matrix/net/common.js rename to src/matrix/net/common.ts index 889042ae..1f0a9f69 100644 --- a/src/matrix/net/common.js +++ b/src/matrix/net/common.ts @@ -15,6 +15,14 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type {BlobHandle} from "../../platform/web/dom/BlobHandle.js"; + +export interface BlobBody { + mimeType: string; + body: BlobHandle; + length: number; +} + export function encodeQueryParams(queryParams) { return Object.entries(queryParams || {}) .filter(([, value]) => value !== undefined) diff --git a/src/platform/types/Platform.ts b/src/platform/types/Platform.ts index ac125e2c..fce55f81 100644 --- a/src/platform/types/Platform.ts +++ b/src/platform/types/Platform.ts @@ -15,14 +15,7 @@ limitations under the License. */ import type {RequestResult} from "../web/dom/request/fetch.js"; -import type {BlobHandle} from "../web/dom/BlobHandle.js"; - -//ts-todo: This should go somewhere else? -interface BlobBody { - mimeType: string; - body: BlobHandle; - length: number; -} +import type {BlobBody} from "../../matrix/net/common"; interface IRequestOptions { uploadProgress?: (loadedBytes: number) => void;