NagRock / ts-mockito

Mocking library for TypeScript
MIT License
969 stars 93 forks source link

anyOfType Matcher #228

Open marimilch opened 1 year ago

marimilch commented 1 year ago

It might be useful to add a matcher for type aliases, so it can be used like this:

type myType = { hadouken: string; shoryuken: number }
when(foo.bar(anyOfType(myType)).thenReturn(true)