import { DynamoDB } from 'aws-sdk' ; import DynamoToPromise from '../dynamo-to-promise' ; export interface UpdateResult < TableModel > { data : TableModel ; } export async function update < Entity > ( updateInput , dynamoPromise ) { const updateOutput = await dynamoPromise . update ( updateInput ) ; const result = { data : updateOutput . Attributes as any , } ; return result ; }