ts-essentials
ts-essentials copied to clipboard
Add createFactoryWithConstrain function utility
Add new function utility which is useful in tests:
const createFactoryWithConstrain =
<Constrain>() =>
<U extends Constrain>(value: U): U =>
value;
Playground with use cases – tsplay.dev/Ndo6Yw
Merged it to master branch
I will release it soon in https://github.com/ts-essentials/ts-essentials/pull/326
Released in 9.3.0 ✅