DefinitelyTyped/types/scrypt-js/scrypt-js-tests.ts
Piotr Błażejewicz (Peter Blazejewicz) 14c4b15400
fix(scrypt-js): correct module export for use in browsers. Fixes #41565 (#42280)
Thanks!

/cc @sheindel
2020-02-12 10:25:38 -08:00

9 lines
451 B
TypeScript

const testBuffer = Buffer.from('test');
const testArray = [74, 65, 73, 74];
const testUint8Array = Uint8Array.from(testArray);
const testCB = (err: Error | undefined | null, progress: number, key?: ReadonlyArray<number>) => {};
scrypt(testBuffer, testBuffer, 1, 1, 1, 1, testCB); // $ExpectType void
scrypt(testArray, testArray, 1, 1, 1, 1, testCB); // $ExpectType void
scrypt(testUint8Array, testUint8Array, 1, 1, 1, 1, testCB); // $ExpectType void