diff --git a/apex.js/apex.js-tests.ts b/apex.js/apex.js-tests.ts new file mode 100644 index 0000000000..e42528d180 --- /dev/null +++ b/apex.js/apex.js-tests.ts @@ -0,0 +1,5 @@ +import λ from "apex.js"; + +const handler = λ(event => { + console.log("Invoked with event " + JSON.stringify(event)); +}); diff --git a/apex.js/index.d.ts b/apex.js/index.d.ts new file mode 100644 index 0000000000..54f70e1a7e --- /dev/null +++ b/apex.js/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for apex.js 2.0 +// Project: https://github.com/apex/node-apex +// Definitions by: Yoriki Yamaguchi +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +export default function λ(fn: (event: any, context: AWSLambda.Context) => any): (event: any, context: AWSLambda.Context, callback: AWSLambda.Callback) => void; diff --git a/apex.js/tsconfig.json b/apex.js/tsconfig.json new file mode 100644 index 0000000000..835b16d90b --- /dev/null +++ b/apex.js/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "apex.js-tests.ts" + ] +} diff --git a/apex.js/tslint.json b/apex.js/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/apex.js/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file