Back to tasksGet help with live coding in real time with Sobes Copilot
Junior — Senior
51
Вывод значения типа Result
Task condition
Необходимо определить, какое значение получит тип Result.
type ExampleType = {
Field1: string
Field2: string
Field3: number
Field4: boolean
}
type T1<S, T> = {
[K in keyof S]: S[K] extends T ? K : never
}[keyof S];
type Result = T1<ExampleType, String>