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

Improve types (#3175)

* Improve types

* Add test
This commit is contained in:
Michael Telatynski
2023-02-22 17:39:37 +00:00
committed by GitHub
parent 21cc9c3d8a
commit d70ffdbc02
4 changed files with 34 additions and 22 deletions

View File

@@ -70,7 +70,7 @@ export class FetchHttpApi<O extends IHttpOpts> {
this.opts.idBaseUrl = url;
}
public idServerRequest<T extends Record<string, unknown>>(
public idServerRequest<T extends {} = Record<string, unknown>>(
method: Method,
path: string,
params: Record<string, string | string[]> | undefined,