Merge pull request #6345 from matrix-org/t3chguy/ts/c1
This commit is contained in:
@@ -26,7 +26,7 @@ Once a timer is finished or aborted, it can't be started again
|
||||
a new one through `clone()` or `cloneIfRun()`.
|
||||
*/
|
||||
export default class Timer {
|
||||
private timerHandle: NodeJS.Timeout;
|
||||
private timerHandle: number;
|
||||
private startTs: number;
|
||||
private promise: Promise<void>;
|
||||
private resolve: () => void;
|
||||
|
||||
@@ -386,7 +386,7 @@ export default class WidgetUtils {
|
||||
});
|
||||
}
|
||||
|
||||
static removeIntegrationManagerWidgets(): Promise<void> {
|
||||
static async removeIntegrationManagerWidgets(): Promise<void> {
|
||||
const client = MatrixClientPeg.get();
|
||||
if (!client) {
|
||||
throw new Error('User not logged in');
|
||||
@@ -399,7 +399,7 @@ export default class WidgetUtils {
|
||||
delete userWidgets[key];
|
||||
}
|
||||
});
|
||||
return client.setAccountData('m.widgets', userWidgets);
|
||||
await client.setAccountData('m.widgets', userWidgets);
|
||||
}
|
||||
|
||||
static addIntegrationManagerWidget(name: string, uiUrl: string, apiUrl: string): Promise<void> {
|
||||
@@ -416,7 +416,7 @@ export default class WidgetUtils {
|
||||
* Remove all stickerpicker widgets (stickerpickers are user widgets by nature)
|
||||
* @return {Promise} Resolves on account data updated
|
||||
*/
|
||||
static removeStickerpickerWidgets(): Promise<void> {
|
||||
static async removeStickerpickerWidgets(): Promise<void> {
|
||||
const client = MatrixClientPeg.get();
|
||||
if (!client) {
|
||||
throw new Error('User not logged in');
|
||||
@@ -429,7 +429,7 @@ export default class WidgetUtils {
|
||||
delete userWidgets[key];
|
||||
}
|
||||
});
|
||||
return client.setAccountData('m.widgets', userWidgets);
|
||||
await client.setAccountData('m.widgets', userWidgets);
|
||||
}
|
||||
|
||||
static makeAppConfig(
|
||||
|
||||
Reference in New Issue
Block a user