Skip to content

Commit cb5ad75

Browse files
Fix Buffer type check failures
Also ran `npm update @types/node --save-dev` to fix some type issues.
1 parent 0431053 commit cb5ad75

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

package-lock.json

Lines changed: 10 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/actions/usbsdfuTargetActions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ export const canWrite = (): AppThunk<RootState> => (dispatch, getState) => {
309309
* @param {MemoryMap} image the input memory map
310310
* @returns {Buffer} the calculated hash
311311
*/
312-
const calculateSHA256Hash = (image = new Uint8Array()) => {
312+
const calculateSHA256Hash = (image: Uint8Array = new Uint8Array()) => {
313313
const digest = Crypto.createHash('sha256');
314314
digest.update(image);
315315
return Buffer.from(digest.digest().reverse());
@@ -321,7 +321,7 @@ const calculateSHA256Hash = (image = new Uint8Array()) => {
321321
* @param {MemoryMap} image the input memory map
322322
* @returns {Buffer} the calculated hash
323323
*/
324-
const calculateSHA512Hash = (image = new Uint8Array()) => {
324+
const calculateSHA512Hash = (image: Uint8Array = new Uint8Array()) => {
325325
const digest = Crypto.createHash('sha512');
326326
digest.update(image);
327327
return Buffer.from(digest.digest().reverse());

0 commit comments

Comments
 (0)