Enable noImplicitReturns
This commit is contained in:
parent
82bffd81de
commit
b9fe509567
5 changed files with 10 additions and 2 deletions
|
@ -14,7 +14,7 @@
|
|||
|
||||
"strict": false,
|
||||
/* Stricter than strict */
|
||||
"noImplicitReturns": false,
|
||||
"noImplicitReturns": true,
|
||||
"noUnusedParameters": false,
|
||||
"noUnusedLocals": false,
|
||||
"noFallthroughCasesInSwitch": false,
|
||||
|
|
|
@ -168,7 +168,7 @@ export default function Credentials({ appContext, appName }: PageProps) {
|
|||
window.location.href = `${getAccountsURL()}/passkeys/flow?passkeySessionID=${passkeySessionID}&redirect=${
|
||||
window.location.origin
|
||||
}/passkeys/finish`;
|
||||
return;
|
||||
return undefined;
|
||||
} else if (twoFactorSessionID) {
|
||||
const sessionKeyAttributes =
|
||||
await cryptoWorker.generateKeyAndEncryptToB64(kek);
|
||||
|
|
|
@ -308,6 +308,7 @@ export async function deriveSensitiveKey(passphrase: string, salt: string) {
|
|||
memLimit /= 2;
|
||||
}
|
||||
}
|
||||
throw new Error("Failed to derive key: Memory limit exceeded");
|
||||
}
|
||||
|
||||
export async function deriveInteractiveKey(passphrase: string, salt: string) {
|
||||
|
|
|
@ -216,4 +216,5 @@ function getIconColor(ownerState, colors: ThemeColorsOptions) {
|
|||
color: colors.stroke.faint,
|
||||
};
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
|
|
@ -26,6 +26,12 @@ export function isPromise<T>(obj: T | Promise<T>): obj is Promise<T> {
|
|||
export async function retryAsyncFunction<T>(
|
||||
request: (abort?: () => void) => Promise<T>,
|
||||
waitTimeBeforeNextTry?: number[],
|
||||
// Need to use @ts-ignore since this same file is currently included with
|
||||
// varying tsconfigs, and the error is only surfaced in the stricter ones of
|
||||
// them.
|
||||
//
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore TSC fails to detect that the exit of the loop is unreachable
|
||||
): Promise<T> {
|
||||
if (!waitTimeBeforeNextTry) waitTimeBeforeNextTry = [2000, 5000, 10000];
|
||||
|
||||
|
|
Loading…
Reference in a new issue