-
-
Notifications
You must be signed in to change notification settings - Fork 190
Migrate Loader Utils to TypeScript #235
base: master
Are you sure you want to change the base?
Conversation
lib/getHashDigest.ts
Outdated
| } | ||
|
|
||
| hash = new BatchedHash(createXXHash64()); | ||
| hash = new BatchedHash(createXXHash64() as unknown as Hash); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This cast is unfortunate. Can it be elimianted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
createXXHash64() & createMd4() is of type WasmHash and I'm having a hard time understanding the best way to 'coerce' these together to be typed properly. Advice here is welcomed.
| @@ -0,0 +1,35 @@ | |||
| import path from "path"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider renaming this in a separate commit to retain the history.
|
@sokra adding you on this review. I'd like some advice on how we'd align the classes between WasmHash instances and regular Hash instances so this is more typesafe. |
Clean up some hash typings.
|
Co-authored-by: Ian Clanton-Thuon <iclanton@users.noreply.github.com>
Remove types from JSDoc.
#234