Conform more of the code base to strict null checking (#10147)
* Conform more of the code base to strict null checking * More strict fixes * More strict work * Fix missing optional type * Iterate
This commit is contained in:
parent
fa036a5080
commit
da7aa4055e
380 changed files with 682 additions and 694 deletions
|
@ -22,7 +22,7 @@ import type * as MegolmExportEncryptionExport from "../../src/utils/MegolmExport
|
|||
|
||||
const webCrypto = new Crypto();
|
||||
|
||||
function getRandomValues<T extends ArrayBufferView>(buf: T): T {
|
||||
function getRandomValues<T extends ArrayBufferView | null>(buf: T): T {
|
||||
// @ts-ignore fussy generics
|
||||
return nodeCrypto.randomFillSync(buf);
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ cissyYBxjsfsAn
|
|||
|
||||
// TODO find a subtlecrypto shim which doesn't break this test
|
||||
it.skip("should decrypt a range of inputs", function () {
|
||||
function next(i: number): unknown {
|
||||
function next(i: number): Promise<string | undefined> | undefined {
|
||||
if (i >= TEST_VECTORS.length) {
|
||||
return;
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ cissyYBxjsfsAn
|
|||
return next(i + 1);
|
||||
});
|
||||
}
|
||||
return next(0);
|
||||
next(0);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue