1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

Improve types (#3589)

* Improve types

* Improve coverage
This commit is contained in:
Michael Telatynski
2023-07-12 11:39:33 +01:00
committed by GitHub
parent 01226e41d9
commit 1cb5fff5a1
8 changed files with 319 additions and 246 deletions

View File

@@ -22,13 +22,11 @@ import { checkObjectHasKeys, encodeParams } from "../utils";
import { TypedEventEmitter } from "../models/typed-event-emitter";
import { Method } from "./method";
import { ConnectionError, MatrixError } from "./errors";
import { HttpApiEvent, HttpApiEventHandlerMap, IHttpOpts, IRequestOpts } from "./interface";
import { HttpApiEvent, HttpApiEventHandlerMap, IHttpOpts, IRequestOpts, Body } from "./interface";
import { anySignal, parseErrorResponse, timeoutSignal } from "./utils";
import { QueryDict } from "../utils";
import { logger } from "../logger";
type Body = Record<string, any> | BodyInit;
interface TypedResponse<T> extends Response {
json(): Promise<T>;
}