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;