38.6 TypeScript in Browser Extensions
Right, so you want to build a browser extension. You’ve chosen TypeScript, which means you’re already smarter than 90% of the people who’ve tried this. You’re also in for a special kind of pain, because the development environment for extensions is a bizarre, anachronistic throwback that the web largely left behind in 2010. It’s not TypeScript’s fault; it’s just that extension APIs were designed for JavaScript the way it was then, and we have to make our modern, type-safe code fit into that old jacket. It’s a tight squeeze, but we can make it work and look good.