Closed sublimator closed 1 year ago
From some code I was working on recently
import { sha512, SHA512 } from '@noble/hashes/sha512' import { Hash } from '@noble/hashes/utils' export default class Sha512 { hash: Hash<SHA512>
In this case could simply do hash = sha512.create() but Maybe it's fine, but it seems a bit involved?
hash = sha512.create()
Thoughts?
I think ReturnType<Type> should work here and would be less code
ReturnType<Type>
Fair, I was using ReturnType but it felt a bit naff somehow
From some code I was working on recently
In this case could simply do
hash = sha512.create()
but Maybe it's fine, but it seems a bit involved?Thoughts?