Skip to content

Commit

Permalink
feat: export types IDynoexpr*
Browse files Browse the repository at this point in the history
  • Loading branch information
ruicsh committed Mar 8, 2023
1 parent e6ca2f1 commit d5bcf9e
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,18 @@ import {
} from "./operations/transact";
import { AwsSdkDocumentClient } from "./document-client";

interface IDynoexprArgs
extends IDynoexprInput,
IBatchRequestInput,
ITransactRequestInput {
DocumentClient: unknown;
export type {
IBatchRequestInput,
IDynoexprInput,
IDynoexprOutput,
ITransactRequestInput,
};

export interface IDynoexprArgs
extends Partial<IDynoexprInput>,
Partial<IBatchRequestInput>,
Partial<ITransactRequestInput> {
DocumentClient?: unknown;
}

function cleanOutput<T>(output: unknown) {
Expand All @@ -28,7 +35,7 @@ function cleanOutput<T>(output: unknown) {
return restOfOutput as T;
}

function dynoexpr<T = IDynoexprOutput>(args: Partial<IDynoexprArgs>): T {
function dynoexpr<T = IDynoexprOutput>(args: IDynoexprArgs): T {
if (args.DocumentClient) {
AwsSdkDocumentClient.setDocumentClient(args.DocumentClient);
}
Expand Down

0 comments on commit d5bcf9e

Please sign in to comment.