Sobes.tech
Junior — Senior

Output of Result type value

livecode

Task condition

It is necessary to determine what value the Result type will receive.

 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>