You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-23 17:02:25 +03:00
Make more of the code conform to Strict TSC (#2756)
This commit is contained in:
committed by
GitHub
parent
f70f6db926
commit
12a4d2a749
@@ -112,11 +112,11 @@ export class MatrixHttpApi<O extends IHttpOpts> extends FetchHttpApi<O> {
|
||||
defer.resolve(JSON.parse(xhr.responseText));
|
||||
}
|
||||
} catch (err) {
|
||||
if (err.name === "AbortError") {
|
||||
if ((<Error>err).name === "AbortError") {
|
||||
defer.reject(err);
|
||||
return;
|
||||
}
|
||||
defer.reject(new ConnectionError("request failed", err));
|
||||
defer.reject(new ConnectionError("request failed", <Error>err));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -207,7 +207,7 @@ export class MatrixHttpApi<O extends IHttpOpts> extends FetchHttpApi<O> {
|
||||
base: this.opts.baseUrl,
|
||||
path: MediaPrefix.R0 + "/upload",
|
||||
params: {
|
||||
access_token: this.opts.accessToken,
|
||||
access_token: this.opts.accessToken!,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user