UNPKG

@nova-odm/auto-marshaller

Version:

A data marshaller that converts JavaScript types into Amazon DynamoDB AttributeValues

31 lines (30 loc) 1.04 kB
/** * A number that may contain greater precision than can safely be stored in * JavaScript's `number` data type. Numerical values are represented internally * as strings (the format used by DynamoDB's JSON-based data representation * schema). */ export declare class NumberValue { readonly value: string; readonly [Symbol.toStringTag] = "DynamoDbNumberValue"; constructor(value: string | number); /** * Convert the value to its desired JSON representation. Called by * `JSON.stringify`. */ toJSON(): number; /** * Convert the value to its desired string representation. Called * automatically when objects are coerced into strings. */ toString(): string; /** * Convert the value to its desired literal representation. Called * automatically when objects appear in arithmetic expressions. */ valueOf(): number; /** * Evaluate whether the provided value is a NumberValue object. */ static isNumberValue(arg: any): arg is NumberValue; }