default

"Exhaustive", type-safe object mapper. Use this when you want to ensure everyproperty on your output object has been mapped.

c
AsyncObjectMapper

Convert from one type of object to another.

N
asyncTypes

These types are used by the AsyncObjectMapper. Here's the magic which makesobject mapper schemas type safe and complete. You generally won't need tomake use of these types within your own code; just ObjectMapper should beenough.

I
asyncTypes.AsyncMapperFunction

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

T
asyncTypes.AsyncMapperSchemaValue

A mapper function, or input property name, used in an AsyncObjectMapperSchema.

I
asyncTypes.AsyncObjectMapperFunction

A callable function, equivalent to calling AsyncObjectMapper#map.It also exposes AsyncObjectMapperFunction#schema as a readonly property.

T
asyncTypes.AsyncObjectMapperSchema

An object, where every property name must match a property name in the desired output type.Every property value must be a AsyncMapperSchemaValue.

v
mapFrom

Provides convenience functions for object mappers.

v
mapFromAsync

Provides convenience functions for object mappers.

c
ObjectMapper

Convert from one type of object to another.

T
v
OmitProperty

Use this symbol to tell an ObjectMapper to exclude the property completely from theoutput object. This is useful when you must distinguish between "property" in outputvs output.property === undefined.

N
types

These types are used by the ObjectMapper. Here's the magic which makesobject mapper schemas type safe and complete. You generally won't need tomake use of these types within your own code; just ObjectMapper should beenough.

T
types.AllowInputKeyIfInputCanExtendOutput

Given some object TInput, and some value TOutputValue, allows any keyof TInput that can be assigned to TOutputValue.

T
types.AllowOmitIfOptional

Lots you use the special symbol OmitProperty in place of an optional/undefined value.

I
types.MapperFunction

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

T
types.MapperSchemaValue

A mapper function, or input property name, used in an ObjectMapperSchema.

I
types.ObjectMapperFunction

A callable function, equivalent to calling ObjectMapper#map.It also exposes ObjectMapperFunction#schema as a readonly property.

T
types.ObjectMapperSchema

An object, where every property name must match a property name in the desired output type.Every property value must be a MapperSchemaValue.

T
types.OptionalArgIfUndefined

An ObjectMapper can take an optional context. The context type is definedwhen you instantiate an ObjectMapper. If the context type is undefined,rather than passing undefined every time, you can just omit the property.(You can still pass undefined, for parity with the mappers that requirea context.)