TypeScript 4.x is fully compatible with Node.js 18. TypeScript 4.7 added `module: "node16"` and `moduleResolution: "node16"` for native Node.js ESM support. If your project uses ESM, set both `"module": "NodeNext"` and `"moduleResolution": "NodeNext"` in tsconfig.json.