Type Alias TPick<Type, Key, IsTypeRef, IsKeyRef>

TPick<Type, Key, IsTypeRef, IsKeyRef>: Type extends TMappedResult
    ? TPickFromMappedResult<Type, TResolvePropertyKeys<Key>>
    : Key extends TMappedKey
        ? TPickFromMappedKey<Type, Key>
        : [IsTypeRef, IsKeyRef] extends [true, true]
            ? TComputed<"Pick", [Type, TResolveTypeKey<Key>]>
            : [IsTypeRef, IsKeyRef] extends [false, true]
                ? TComputed<"Pick", [Type, TResolveTypeKey<Key>]>
                : [IsTypeRef, IsKeyRef] extends [true, false]
                    ? TComputed<"Pick", [Type, TResolveTypeKey<Key>]>
                    : TPickResolve<Type, TResolvePropertyKeys<Key>>

Type Parameters

  • Type extends TSchema
  • Key extends TSchema | PropertyKey[]
  • IsTypeRef extends boolean = Type extends TRef
        ? true
        : false
  • IsKeyRef extends boolean = Key extends TRef
        ? true
        : false