Comply with noImplicitAny (#9940)
* Stash noImplicitAny work * Stash * Fix imports * Iterate * Fix tests * Delint * Fix tests
This commit is contained in:
parent
ac7f69216e
commit
61a63e47f4
359 changed files with 1621 additions and 1353 deletions
|
@ -15,6 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import url from "url";
|
||||
import { ComponentProps } from "react";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
import type { Room } from "matrix-js-sdk/src/models/room";
|
||||
|
@ -76,7 +77,7 @@ export class IntegrationManagerInstance {
|
|||
return dialogTermsInteractionCallback(policyInfo, agreedUrls, "mx_TermsDialog_forIntegrationManager");
|
||||
});
|
||||
|
||||
const newProps = {};
|
||||
const newProps: Partial<ComponentProps<typeof IntegrationManager>> = {};
|
||||
try {
|
||||
await client.connect();
|
||||
if (!client.hasCredentials()) {
|
||||
|
|
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||
|
||||
import url from "url";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client";
|
||||
import { ClientEvent, IClientWellKnown, MatrixClient } from "matrix-js-sdk/src/client";
|
||||
import { compare } from "matrix-js-sdk/src/utils";
|
||||
|
||||
import type { MatrixEvent } from "matrix-js-sdk/src/models/event";
|
||||
|
@ -36,7 +36,7 @@ const KIND_PREFERENCE = [
|
|||
];
|
||||
|
||||
export class IntegrationManagers {
|
||||
private static instance;
|
||||
private static instance?: IntegrationManagers;
|
||||
|
||||
private managers: IntegrationManagerInstance[] = [];
|
||||
private client: MatrixClient;
|
||||
|
@ -83,7 +83,7 @@ export class IntegrationManagers {
|
|||
}
|
||||
}
|
||||
|
||||
private setupHomeserverManagers = async (discoveryResponse): Promise<void> => {
|
||||
private setupHomeserverManagers = async (discoveryResponse: IClientWellKnown): Promise<void> => {
|
||||
logger.log("Updating homeserver-configured integration managers...");
|
||||
if (discoveryResponse && discoveryResponse["m.integrations"]) {
|
||||
let managers = discoveryResponse["m.integrations"]["managers"];
|
||||
|
@ -202,7 +202,7 @@ export class IntegrationManagers {
|
|||
domainName = url.parse(domainName).host;
|
||||
}
|
||||
|
||||
let wkConfig: object;
|
||||
let wkConfig: IClientWellKnown;
|
||||
try {
|
||||
const result = await fetch(`https://${domainName}/.well-known/matrix/integrations`);
|
||||
wkConfig = await result.json();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue