Skip to content

Workery / helpers

Module: helpers

Table of contents

Classes

Functions

Functions

jsonCoerce

jsonCoerce<Out>(value): Out | string

Type parameters

NameType
Outunknown

Parameters

NameType
valuestring

Returns

Out | string

Defined in

src/helpers.ts:4

jsonCoerce<Out>(value): Out[] | string[]

Type parameters

NameType
Outunknown

Parameters

NameType
valuestring[]

Returns

Out[] | string[]

Defined in

src/helpers.ts:5


isJsonCoercible

isJsonCoercible(schema): boolean

Parameters

NameType
schemaZodType<any, ZodTypeDef, any>

Returns

boolean

Defined in

src/helpers.ts:19


createResolveLater

createResolveLater<T>(): [(res: T) => void, (fn: (v: T) => void) => void]

Type parameters

NameType
TResponse

Returns

[(res: T) => void, (fn: (v: T) => void) => void]

Defined in

src/helpers.ts:31


baseExceptionHandler

baseExceptionHandler<E>(_, e): Response

Type parameters

Name
E

Parameters

NameType
_ArgsOf<{}, E>
eany

Returns

Response

Defined in

src/helpers.ts:44


createObjectPartial

createObjectPartial<T1>(base): <T2>(final: T2) => T1 & T2

Type parameters

NameType
T1extends Record<any, any>

Parameters

NameType
baseT1

Returns

fn

▸ <T2>(final): T1 & T2

Type parameters
NameType
T2extends Record<any, any>
Parameters
NameType
finalT2
Returns

T1 & T2

Defined in

src/helpers.ts:49