interface types.MapperFunction

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

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>,
): TOutput[TOutputKey] | AllowOmitIfOptional<TOutput, TOutputKey>

Usage

import { types } from ".";