We've published an official TypeScript binding for the EdgeWorkers JavaScript API to help you design your EdgeWorker functions.

Before you begin

TypeScript supports features to help write, maintain, and refactor your JavaScript code including:
  • autocomplete functions within the supported integrated development environments (IDE) for the EdgeWorkers JavaScript object model
  • lint code analysis
  • a TypeScript compiler to find problems before activating your EdgeWorker version

For more information about TypeScript go to: https://www.typescriptlang.org/ or you can learn more by reading our blog.

How to

  1. Enter this command to install the DefinitelyTyped definition for the EdgeWorker API inside an existing TypeScript project:
    $ npm install @types/akamai-edgeworkers 
  2. The node_packages/@types/akamai-edgeworkers directory contains the type bindings. Set your tsconfig.json to use ES2015 as the compilation target and module code generator:
        "compilerOptions": {
        "module": "es2015",
        "target": "ES2015",