TypeScript

What is it?

TypeScript is a strongly typed programming language that builds on JavaScript by adding optional static type checking. Developed by Microsoft, it helps catch errors during development rather than at runtime, improves code documentation through type definitions, and enables better tooling with features like intelligent autocompletion and safe refactoring in modern code editors.

Practical example

When defining a function in TypeScript, you specify parameter and return types: function calculateTotal(price: number, quantity: number): number. If you accidentally pass a string, TypeScript shows an error immediately in your editor before you even run the code. Interfaces define object shapes like interface User with id, name, and email properties, ensuring API responses match expected structures throughout your codebase.

Test your knowledge

What does TypeScript add to JavaScript?

Ask Lex
Lex knows the context of this term and can give targeted explanations, examples, and extra context.
Tip: Lex replies briefly in the widget. For more detail, go to full screen mode.

Learn our language

Learn these terms from real professionals and take your skills further at KdG MCT.

Study at KdG