Turn comments into proper tsdoc

This commit is contained in:
David Baker
2025-02-07 10:37:12 +01:00
parent 1178d77fb8
commit 7c2d9f4954
2 changed files with 21 additions and 3 deletions

View File

@@ -11,11 +11,26 @@ import { logger } from "matrix-js-sdk/src/logger";
import { useMatrixClientContext } from "../../../../contexts/MatrixClientContext";
interface KeyStoragePanelState {
// 'null' means no backup is active. 'undefined' means we're still loading.
/**
* Whether key storage is enabled, or 'undefined' if the state is still loading.
*/
isEnabled: boolean | undefined;
/**
* A function that can be called to enable or disable key storage.
* @param enable True to turn key storage on or false to turn it off
*/
setEnabled: (enable: boolean) => void;
loading: boolean; // true if the state is still loading for the first time
busy: boolean; // true if the status is in the process of being changed
/**
* True if the state is still loading for the first time
*/
loading: boolean;
/**
* True if the status is in the process of being changed
*/
busy: boolean;
}
export function useKeyStoragePanelViewModel(): KeyStoragePanelState {

View File

@@ -16,6 +16,9 @@ import { useKeyStoragePanelViewModel } from "../../../viewmodels/settings/encryp
import SdkConfig from "../../../../SdkConfig";
interface Props {
/**
* Called when the user either cancels the operation or key storage has been disabled
*/
onFinish: () => void;
}