Menu

TypeScript 7 Migration: Lambda and CDK Projects
📰

TypeScript 7 Migration: Lambda and CDK Projects

DEV Community: backend·Sascha Mirow-Stanitzok·5 days ago
#KZvCK252
#devtobackend#devto#dev#typescript#node
Reading 0:00
15s threshold

A TypeScript 7 migration sounds like bumping a version number in package.json , and that is exactly how I treated it at first. Then the first build stops with three errors in tsconfig.json , cdk synth fails with a cryptic message from ts-node, and npm refuses to install typescript-eslint. The compiler itself is faster than ever. It’s the tools around it that slow you down.

This matters to me because Lambda and CDK projects written in TypeScript often run on an old tsconfig for years. So in this article you walk through the whole upgrade once: from checking the configuration to replacing ts-node and keeping ESLint on TypeScript 6 for the time being. Every error message below comes from a real test run with TypeScript 7.0.2.

In short

TypeScript 7 is the new compiler written in Go, and it turns every option that TypeScript 6 deprecated into a hard error. In Lambda and CDK projects that is quick to fix, because esbuild does the building anyway and tsc only checks types.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.