interface asyncTypes.AsyncMapperFunction

A function that takes some input object, and an optional context object, and returns a promise of an output. This is used as part of an AsyncObjectMapperSchema.

Type Parameters

TInput extends object
TOutput extends object
TContext extends object | undefined
TOutputKey extends keyof TOutput = keyof TOutput

Call Signatures

<
TInputSubset extends TInput,
TContextSubset extends TContext
>
(
input: TInputSubset,
context: OptionalArgIfUndefined<TContextSubset>
): Promise<
ExactReturn<TOutput[TOutputKey]>
| AllowOmitIfOptional<TOutput, TOutputKey>
>

Usage

import { asyncTypes } from ".";