TypeScript extends JavaScript with static type checking, preventing runtime errors by catching mistakes during development.