From 538fe3f98270d44fe429d47ca7bc4d66641d0837 Mon Sep 17 00:00:00 2001 From: Elad Ben-Israel Date: Wed, 19 Dec 2018 14:46:12 +0200 Subject: [PATCH] build: alias Function as LambdaFunction to avoid linter error (#1398) New tslint error introduced: Do not use the Function constructor to create functions but we don't really mean the native "Function" here. --- packages/@aws-cdk/aws-lambda/lib/singleton-lambda.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda/lib/singleton-lambda.ts b/packages/@aws-cdk/aws-lambda/lib/singleton-lambda.ts index 5b8235061a641..026dc3b5676b3 100644 --- a/packages/@aws-cdk/aws-lambda/lib/singleton-lambda.ts +++ b/packages/@aws-cdk/aws-lambda/lib/singleton-lambda.ts @@ -1,6 +1,6 @@ import iam = require('@aws-cdk/aws-iam'); import cdk = require('@aws-cdk/cdk'); -import { Function, FunctionProps } from './lambda'; +import { Function as LambdaFunction, FunctionProps } from './lambda'; import { FunctionRef } from './lambda-ref'; import { Permission } from './permission'; @@ -66,7 +66,7 @@ export class SingletonFunction extends FunctionRef { return existing as FunctionRef; } - return new Function(stack, constructName, props); + return new LambdaFunction(stack, constructName, props); } }