Closed VictorKoenders closed 9 months ago
Added tests for HashMap
, HashSet
and examples on how to use custom hashers.
It seems like you can't use HashMap<K, V, CustomHasher>
directly because the TS
derive requires that all type arguments extend from TS
. However with a type alias it works perfectly fine.
LGTM. I edited your tests to expect types instead of interfaces due to #203
Great! Don't see any problems, here, so let's get this merged. Thanks @VictorKoenders for the PR, and thanks @escritorio-gustavo for taking a look!
By default the hasher is RandomState but developers can override this. This PR makes ts-rs usable with e.g. https://docs.rs/rustc-hash/latest/rustc_hash/.