Fix typescript errors
This commit is contained in:
parent
d6378133d8
commit
e2abc312d3
3 changed files with 5 additions and 4 deletions
|
@ -51,6 +51,7 @@ export interface ILogItem {
|
|||
catch(err: Error): Error;
|
||||
serialize(filter: LogFilter, parentStartTime: number | undefined, forced: boolean): ISerializedItem | undefined;
|
||||
finish(): void;
|
||||
child(labelOrValues: LabelOrValues, logLevel?: LogLevel, filterCreator?: FilterCreator): ILogItem;
|
||||
}
|
||||
|
||||
export interface ILogger {
|
||||
|
|
|
@ -21,7 +21,7 @@ import type {IHomeServerRequest} from "./HomeServerRequest";
|
|||
import type {Reconnector} from "./Reconnector";
|
||||
import type {EncodedBody} from "./common";
|
||||
import type {IRequestOptions, RequestFunction} from "../../platform/types/types";
|
||||
import type {LogItem} from "../../logging/LogItem";
|
||||
import type {ILogItem} from "../../logging/types";
|
||||
|
||||
type RequestMethod = "POST" | "GET" | "PUT";
|
||||
|
||||
|
@ -57,7 +57,7 @@ export class HomeServerApi {
|
|||
private _baseRequest(method: RequestMethod, url: string, queryParams?: Record<string, any>, body?: Record<string, any>, options?: IRequestOptions, accessToken?: string): IHomeServerRequest {
|
||||
const queryString = encodeQueryParams(queryParams);
|
||||
url = `${url}?${queryString}`;
|
||||
let log: LogItem | undefined;
|
||||
let log: ILogItem | undefined;
|
||||
if (options?.log) {
|
||||
const parent = options?.log;
|
||||
log = parent.child({
|
||||
|
|
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||
|
||||
import type {RequestResult} from "../web/dom/request/fetch.js";
|
||||
import type {EncodedBody} from "../../matrix/net/common";
|
||||
import type {LogItem} from "../../logging/LogItem";
|
||||
import type {ILogItem} from "../../logging/types";
|
||||
|
||||
export interface IRequestOptions {
|
||||
uploadProgress?: (loadedBytes: number) => void;
|
||||
|
@ -24,7 +24,7 @@ export interface IRequestOptions {
|
|||
body?: EncodedBody;
|
||||
headers?: Map<string, string|number>;
|
||||
cache?: boolean;
|
||||
log?: LogItem;
|
||||
log?: ILogItem;
|
||||
prefix?: string;
|
||||
method?: string;
|
||||
format?: string;
|
||||
|
|
Reference in a new issue