UNPKG

duenamodb

Version:

Simple DynamoDB client written in TypeScript.

8 lines (7 loc) 571 B
import { PutItemCommandInput } from '@aws-sdk/client-dynamodb'; import { DynamoDBTypes } from './types'; type PutItemOptions = Omit<PutItemCommandInput, 'TableName' | 'Item'>; export type PutItemFunction<Attributes extends DynamoDBTypes> = (item: Attributes, options?: PutItemOptions) => Promise<Attributes>; export declare const createPutItem: <Attributes extends DynamoDBTypes>(tablename: string) => PutItemFunction<Attributes>; export declare const putItem: <T>(tableName: string, input: PutItemCommandInput['Item'], options: PutItemOptions) => Promise<T>; export {};