Skip to content

Commit

Permalink
build: alias Function as LambdaFunction to avoid linter error (#1398)
Browse files Browse the repository at this point in the history
New tslint error introduced: Do not use the Function constructor to create functions
but we don't really mean the native "Function" here.
  • Loading branch information
Elad Ben-Israel authored Dec 19, 2018
1 parent fe6923d commit 538fe3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-lambda/lib/singleton-lambda.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 538fe3f

Please sign in to comment.