Edge Computing with Cloudflare Workers
Bootstrapping a Typescript Worker

Bootstrapping a Typescript Worker

6/27/2018 · Steven Pack

What this post added

This post details a method for bootstrapping a TypeScript project for Cloudflare Workers, including setting up a local development environment with Webstorm, using Yeoman for scaffolding, integrating node-fetch for type definitions, and configuring Jest for testing. It also outlines the manual steps required to make a TypeScript-transpiled Worker compatible with the Cloudflare Workers runtime by addressing issues with exports, require, and native browser APIs. Finally, it introduces Grunt for automating the build process to generate Worker-compatible JavaScript from TypeScript, including handling preamble injection and removing TypeScript-specific compilation artifacts.

Read the original post ↗