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
1 changed files with 5 additions and 0 deletions

View File

@ -20,3 +20,8 @@ console.log($contains!(searchItem, "erwin", "tj"));
// OK, record the type of 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>())