Type Alias PropsOfPropType<Tinput, TpropType>

PropsOfPropType<Tinput, TpropType>: Tinput extends object
    ? {
        [K in Exclude<keyof Tinput, never>]: K extends TpropType
            ? K
            : never
    }[keyof Tinput]
    : never

A type helper to extract the prop names, of props with a matching TpropType, i.e the type of the props (i.e string or symbol) from any value type.

If value is any object, It extracts ONLY its string or symbol keys.

Otherwise, it returns never

Type Parameters

  • Tinput
  • TpropType extends string | symbol