-
-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 <[email protected]>
Remove types from JSDoc.
#234