🤖 Merge PR #63003 [is-lambda] Add types by @BendingBender

This commit is contained in:
Dimitri B
2022-11-02 08:39:59 +01:00
committed by GitHub
parent 2f94aa2d2c
commit ce82e9b2b6
4 changed files with 45 additions and 0 deletions

18
types/is-lambda/index.d.ts vendored Normal file
View File

@@ -0,0 +1,18 @@
// Type definitions for is-lambda 1.0
// Project: https://github.com/watson/is-lambda
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = isLambda;
/**
* @returns `true` if the current environment is an [AWS Lambda](https://aws.amazon.com/lambda/) server.
*
* @example
* import isLambda = require('is-lambda')
*
* if (isLambda) {
* console.log('The code is running on a AWS Lambda')
* }
*/
declare const isLambda: boolean;

View File

@@ -0,0 +1,3 @@
import isLambda = require('is-lambda');
isLambda; // $ExpectType boolean

View File

@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"is-lambda-tests.ts"
]
}

View File

@@ -0,0 +1 @@
{ "extends": "@definitelytyped/dtslint/dt.json" }