Open
Description
openedon Jul 10, 2024
π Search Terms
string completions type alias
π Version & Regression Information
- This is the behavior in every version I tried
β― Playground Link
π» Code
type GetConcreteByKey<T, TKey extends keyof T, TValue extends T[TKey]> = T &
Record<TKey, TValue>;
type Fails = GetConcreteByKey<{ type: "foo" } | { type: "bar" }, "">;
type Works = GetConcreteByKey<{ type: "foo" } | { type: "bar" }, "", "foo">;
export {};
π Actual behavior
Completions are not provided for the second type argument in Fails
π Expected behavior
I'd expect this to work the same way as it works in Works
Additional information about the issue
No response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment