Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface AnyType<T>

A node used to store values whose type is variable or unknown. The value will be marshalled an unmarshalled based on runtime type detection, which may result in data not being precisely round-tripped (e.g., "empty" types such as zero-length strings, buffers, and sets will be returned from the mapper as null rather than an empty instance of the originally submitted type).

Type parameters

  • T

Hierarchy

Index

Properties

Optional attributeName

attributeName: undefined | string

The key in which this value will be persisted in DynamoDB. If not provided, the key will be assumed to be the same in the input and in the persisted record.

Optional defaultProvider

defaultProvider: undefined | function

An optional default value factory. If a type has a defined defaultProvider and its value is undefined in the provided input, the defaultProvider will be called and its return value serialized.

Optional onEmpty

onEmpty: EmptyHandlingStrategy

The behavior the marshaller should exhibit when it encounters "empty" data that would be rejected as invalid by DynamoDB, such as 0-length buffers or the string ''.

Optional onInvalid

onInvalid: InvalidHandlingStrategy

The behavior the marshaller should exhibit when it encounters data that cannot be marshalled to a DynamoDB AttributeValue, such as a Symbol or Function object.

type

type: "Any"

Optional unwrapNumbers

unwrapNumbers: undefined | true | false

Whether numbers should be unmarshalled to a special object type that can preserve values that would lose precision if converted to JavaScript's native number type.