Suppose I have some generic type
type Foo<T = string, U = number> = {
t: T
u: U
}
Neither T nor U are required. How can I provide U but not T.
Ideally I could do something like
type G = Foo<,string> // expected syntax
// expected result
type G = {
t: string;
u: string;
}
Things I've tried:
type G = Foo<never, string> // ❌
type G = Foo<unknown, string> // ❌
type G = Foo<Foo['t'], string> // ❌ (Works in this exact example but not in the general case. I want to extract the first default parameter type rather than extracting out the resulting `t`).