66// This an ESLint issue, not a typescript issue, you can trust other errors :)
77type TriggerESLintIssue = `${"a" } `;
88
9- import { Equal , Expect , TODO } from "../helpers" ;
9+ import { Compute , Equal , Expect , TODO } from "../helpers" ;
1010
1111/**
1212 * 1. Implement a `ExtractUrlParamNames<url>` generic
@@ -36,10 +36,12 @@ namespace two {
3636 type ExtractUrlParams < url > = TODO ;
3737
3838 type res1 = ExtractUrlParams < "/user/:username" > ;
39- type test1 = Expect < Equal < res1 , { username : string } > > ;
39+ type test1 = Expect < Equal < Compute < res1 > , { username : string } > > ;
4040
4141 type res2 = ExtractUrlParams < "/user/:username/post/:postId" > ;
42- type test2 = Expect < Equal < res2 , { username : string ; postId : string } > > ;
42+ type test2 = Expect <
43+ Equal < Compute < res2 > , { username : string ; postId : string } >
44+ > ;
4345}
4446
4547namespace bonus {
@@ -54,10 +56,20 @@ namespace bonus {
5456 type ExtractUrlParams < url > = TODO ;
5557
5658 type res3 = ExtractUrlParams < "/dashboard(/:dashboardId)" > ;
57- type test3 = Expect < Equal < res3 , { dashboardId ?: string } > > ;
59+ type test3 = Expect < Equal < Compute < res3 > , { dashboardId ?: string } > > ;
5860
5961 type res4 = ExtractUrlParams < "org/:orgId/dashboard(/:dashboardId)" > ;
60- type test4 = Expect < Equal < res4 , { orgId : string ; dashboardId ?: string } > > ;
62+ type test4 = Expect <
63+ Equal < Compute < res4 > , { orgId : string ; dashboardId ?: string } >
64+ > ;
65+ type res5 =
66+ ExtractUrlParams < "org/:orgId/dashboard(/:dashboardId/widgets/:widgetId)" > ;
67+ type test5 = Expect <
68+ Equal <
69+ Compute < res5 > ,
70+ { orgId : string ; dashboardId ?: string ; widgetId ?: string }
71+ >
72+ > ;
6173 }
6274
6375 /**
0 commit comments