feat: Demonstrate a trick for further resolving the dep type at compiletime

This commit is contained in:
Glen Whitney 2023-08-18 15:00:21 -07:00
parent 770c302342
commit da5b2c3467

View File

@ -20,3 +20,8 @@ console.log($contains!(searchItem, "erwin", "tj"));
// OK, record the type of square: // OK, record the type of square:
square.reflectedType = $$typeToString!<typeof square>(); square.reflectedType = $$typeToString!<typeof square>();
type Expand<T> = T extends unknown ? { [K in keyof T]: T[K] } : never;
type Out = Expand<Dependencies<'multiply', number>>;
console.log("Deps type is", $$typeToString!<Out>())