(lambda): Consider renaming `Function`
See original GitHub issueThe current API for @aws-cdk/aws-lambda
exposes a type called Function
. In addition to being easily confused with the built-in Function
type, this clashes with typescript-eslint rules like ban-types
, as discussed here. Would it not be more correct to name the export LambdaFunction
?
Additionally, @aws-cdk/aws-events-targets
does expose a type called LambdaFunction
, but (unless I am missing something) would it not be more correct to name that export LambdaFunctionTarget
?
Use Case
I’d like this feature so that newcomers to the CDK can easily tell that Function
is not the same as the Function
built-in type, and can use eslint rules with no additional challenges, and so that the API surface exposed by aws-cdk is more intuitive.
Proposed Solution
for the next major release of aws-cdk:
- In
aws-lambda
, renameFunction
toLambdaFunction
- In
aws-event-targets
, renameLambdaFunction
toLambdaFunctionTarget
(or similar) (There may be other similar renames in that module).
Other
If you would be willing to accept it, I am happy to make a PR for this one
- 👋 I may be able to implement this feature request
- ⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:6 (3 by maintainers)
This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
I’m happy to leave this open to see if there’s more interest here, or if there are more complaints in this area.
If we don’t see that signal over time, we will have to close this request out. We will need to prioritize which requests to service.