dynamodb-toolbox
Version:
Lightweight and type-safe query builder for DynamoDB and TypeScript.
7 lines (6 loc) • 631 B
TypeScript
import type { Schema, SchemaRequiredProp } from '../../../schema/index.js';
import type { FormatterReturn, FormatterYield } from './formatter.js';
import type { FormatAttrValueOptions } from './options.js';
export declare const requiringOptions: Set<SchemaRequiredProp>;
export declare const isRequired: ({ props }: Schema) => boolean;
export declare function schemaFormatter<SCHEMA extends Schema, OPTIONS extends FormatAttrValueOptions<SCHEMA> = {}>(schema: SCHEMA, rawValue: unknown, options?: OPTIONS): Generator<FormatterYield<Schema, FormatAttrValueOptions<Schema>>, FormatterReturn<Schema, FormatAttrValueOptions<Schema>>>;