@shaggytools/nhtsa-api-wrapper - v3.0.4 / Exports / utils/types
Module: utils/types
Table of contents
References
Type Aliases
References
IArgToValidate
Re-exports IArgToValidate
QueryStringParams
Re-exports QueryStringParams
QueryStringParamsEncoded
Re-exports QueryStringParamsEncoded
QueryStringTypes
Re-exports QueryStringTypes
Type Aliases
AtLeastOne
Ƭ AtLeastOne<T
, R
>: { [P in R]-?: Required<Pick<T, P>> & Partial<Omit<T, P>> }[R
]
Require at least one of a set of properties in an object https://stackoverflow.com/a/49725198
Type parameters
Name | Type |
---|---|
T | T |
R | extends keyof T = keyof T |
Defined in
RequireOnlyOne
Ƭ RequireOnlyOne<T
, Keys
>: Omit
<T
, Keys
> & { [K in keyof Required<T>]: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>> }[Keys
]
Require only one of a set of properties in an object https://stackoverflow.com/a/49725198
Type parameters
Name | Type |
---|---|
T | T |
Keys | extends keyof T = keyof T |