Conform more of the codebase to strictNullChecks (#10842)

This commit is contained in:
Michael Telatynski 2023-05-11 09:56:56 +01:00 committed by GitHub
parent 5eea2c8b02
commit 82e32035fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 126 additions and 93 deletions

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { ISecretStorageKeyInfo } from "matrix-js-sdk/src/crypto/api";
import { ICryptoCallbacks } from "matrix-js-sdk/src/crypto";
import { IMatrixClientCreds } from "../MatrixClientPeg";
import { Kind as SetupEncryptionKind } from "../toasts/SetupEncryptionToast";
@ -41,14 +41,6 @@ function getSecretStorageKey(): Uint8Array | null {
return null;
}
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
function getDehydrationKey(
keyInfo: ISecretStorageKeyInfo,
checkFunc: (key: Uint8Array) => void,
): Promise<Uint8Array | null> {
return Promise.resolve(null);
}
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
function catchAccessSecretStorageError(e: Error): void {
// E.g. notify the user in some way
@ -70,7 +62,7 @@ export interface ISecurityCustomisations {
getSecretStorageKey?: typeof getSecretStorageKey;
catchAccessSecretStorageError?: typeof catchAccessSecretStorageError;
setupEncryptionNeeded?: typeof setupEncryptionNeeded;
getDehydrationKey?: typeof getDehydrationKey;
getDehydrationKey?: ICryptoCallbacks["getDehydrationKey"];
/**
* When false, disables the post-login UI from showing. If there's