Typescript
The framework supports Typescript out of the box, no additional configuration required. This means the cf-functions
config file as well as any handler code or test files can all be .ts
files.
A number of useful types related to CloudFront Functions have been included in this package. Check the index.js
of this
package for a list of bundled types.
Vanilla JS
If you prefer to use vanilla Javascript, this is also possible. Ensure that your tsconfig.json
includes the allowJs
option.
// tsconfig.json
{
"compilerOptions": {
"allowJs": true,
...
},
...
}