Type Alias DeepPickStartsWith<T, Prefix>

DeepPickStartsWith: T extends (infer U)[]
    ? DeepPickStartsWith<U, Prefix>[]
    : T extends object
        ? {
            [K in keyof T as K extends string
                ? K extends `${Prefix}${string}` ? K : never
                : K]: DeepPickStartsWith<T[K], Prefix>
        }
        : T

Type Parameters

  • T
  • Prefix extends string