Skip to content

Commit

Permalink
placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
tbeseda committed Sep 26, 2023
1 parent d9cdc88 commit ad5a017
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"vendor": "esbuild scripts/vendor-entry.mjs --bundle --platform=node --format=cjs --outfile=src/_vendor.js"
},
"main": "src/index.js",
"types": "src/index.d.ts",
"engines": {
"node": ">=16"
},
Expand Down
1 change: 1 addition & 0 deletions plugins/dynamodb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
},
"bugs": "https://github.com/architect/aws-lite/issues",
"main": "src/index.mjs",
"types": "src/index.d.ts",
"engines": {
"node": ">=16"
},
Expand Down
13 changes: 13 additions & 0 deletions plugins/dynamodb/src/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import "@aws-lite/client";

declare interface Dynamodb {
GetItem: (options: any) => Promise<any>;
PutItem: (options: any) => Promise<any>;
// etc...
}

declare global {
interface AwsLiteClient {
dynamodb: Dynamodb;
}
}
27 changes: 27 additions & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// https://www.typescriptlang.org/docs/handbook/modules.html#working-with-other-javascript-libraries
// 'We call declarations that don't define an implementation "ambient".'

interface AwsLiteConfig {
accessKeyId?: string;
secretAccessKey?: string;
sessionToken?: string;
region?: string;
profile?: string;
autoloadPlugins?: boolean;
debug?: string;
keepAlive?: boolean;
protocol?: string;
host?: string;
port?: number;
plugins?: any[];
}

declare interface AwsLiteClient {
(options: any): Promise<any>;
}

declare function AwsLite(config?: AwsLiteConfig): Promise<AwsLiteClient>;

declare module "@aws-lite/client" {
export = AwsLite;
}

0 comments on commit ad5a017

Please sign in to comment.