Skip to content

SearchResults

SearchResults<T>: Pick<PartialSearchResult, ResourceTypeToResultKey[T[number]]> extends infer R ? number extends T["length"] ? R : Required<R> : never

Makes all properties in SearchResults optional, unless the type T is a tuple (literal array / tuple) of SearchTypes.

Type parameters

T extends readonly ItemTypes[]

Source

types.ts:737