I'm unfamiliar with Typescript and struggling to grasp the significance of this syntax. Could someone provide some clarification?
type Type1<K> = K extends string ? { [P in K]: string } : never;
If type K is a subclass of string, does that mean Type1 will result in an array of strings? For example:
{"x": ["a", "b", "c"],
"z": ["d", "e", "f"]
//and so on
}
Or
{"x": "a",
"z": "b"
//and so on
}