Skip to content
On this page

@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

NameType
TT
Rextends keyof T = keyof T

Defined in

utils/types.ts:18


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

NameType
TT
Keysextends keyof T = keyof T

Defined in

utils/types.ts:26

Released under the MIT License.