From da5b2c346768acf6f0d38e6272f3451297abfca2 Mon Sep 17 00:00:00 2001 From: Glen Whitney Date: Fri, 18 Aug 2023 15:00:21 -0700 Subject: [PATCH] feat: Demonstrate a trick for further resolving the dep type at compiletime --- src/generic/arithmetic.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/generic/arithmetic.ts b/src/generic/arithmetic.ts index afe4aec..57bacad 100644 --- a/src/generic/arithmetic.ts +++ b/src/generic/arithmetic.ts @@ -20,3 +20,8 @@ console.log($contains!(searchItem, "erwin", "tj")); // OK, record the type of square: square.reflectedType = $$typeToString!(); + +type Expand = T extends unknown ? { [K in keyof T]: T[K] } : never; +type Out = Expand>; + +console.log("Deps type is", $$typeToString!())