abi
abi14mo ago

Testing that advanced types work

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.
2 Replies
ioB
ioB14mo ago
you could try std’s type module https://deno.land/std@0.185.0/testing/types.ts?doc=
abi
abi14mo ago
Thanks that’s exactly what I needed!