D
Deno

help

Testing that advanced types work

Aabi5/2/2023
I have a bunch of pretty advanced types, with generics and inferences all over the place. What would be a good way to test that these all work as expected? In other words, I want to make sure that MyCoolType<"foo bar baz"> is equal to the type ["foo", "bar", "baz"], as an example.
IioB5/2/2023
you could try std’s type module https://deno.land/std@0.185.0/testing/types.ts?doc=
Aabi5/2/2023
Thanks that’s exactly what I needed!

Looking for more? Join the community!