add type definition for package: apex.js (#13796)

* add apex.js

* 4 spaces

* fix `implicitly has any type`

* match the style of tslint.json

* make `event` and `context` not optional

* avoid annotating the types of callbacks manually
This commit is contained in:
Yoriki Yamaguchi
2017-01-06 08:30:54 -08:00
committed by Andy
parent ced2d7864b
commit 9e02b7160d
4 changed files with 34 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
import λ from "apex.js";
const handler = λ(event => {
console.log("Invoked with event " + JSON.stringify(event));
});
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for apex.js 2.0
// Project: https://github.com/apex/node-apex
// Definitions by: Yoriki Yamaguchi <https://github.com/y13i>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="aws-lambda" />
export default function λ(fn: (event: any, context: AWSLambda.Context) => any): (event: any, context: AWSLambda.Context, callback: AWSLambda.Callback) => void;
+20
View File
@@ -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"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "../tslint.json" }