(aws-cloudfront): Official tsconfig for CloudFront functions runtimes
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
Dev/build time confirmation that I'm using syntax that is valid for the given CF Function runtime version.
### Use Case
For example, I'm writing some code for runtime version 1 and i declare a `const`, I do not want to wait until the actual first invocation of the function to be alerted that runtime version 1 doesn't support that.
### Proposed Solution
Ship a tsconfig for both runtimes either in an AWS-owned package or in the popular [tsconfig/bases](https://github.com/tsconfig/bases/tree/main/bases) that codifies the features documented in the [AWS Docs](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/functions-javascript-runtime-features.html).
### Other Information
* [Related issue](https://github.com/aws/aws-cdk/issues/30475) that requests bundler support, potentially to achieve similar ends
* [Related article](https://repost.aws/questions/QUyiUmFAvYQaylmG_UkfJZrA/creating-a-cloudfront-function-in-typescript-using-the-cdk) on authoring CloudFront functions with typescript
* [Related package](https://www.npmjs.com/package/@types/aws-cloudfront-function) that provides types for CloudFront functions
### Acknowledgements
- [x] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### AWS CDK Library version (aws-cdk-lib)
2.236.0
### AWS CDK CLI version
2.1104.0
### Environment details (OS name and version, etc.)
MacOS 26
Contributor guide
Research direction
Start with the AWS documentation for CloudFront Functions JavaScript runtime features and review the related bundler issue and @types/aws-cloudfront-function package. Decide where the two runtime-specific tsconfigs should live, then define the supported syntax for each runtime and verify that TypeScript rejects unsupported features.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- build-system, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100