Skip to content

Report a problem:

Problems can be reported via Microsoft Teams in your team channel within the "IT - Codey" team.

Please include the following information:

Report type:
Docs problem report a bug instead →
Path:
/vnext/cookbook/the-stack/typescript.html
Message:

DESCRIBE THE PROBLEM BEFORE SUBMITTING TO CODEY

TypeScript

TypeScript is a strongly typed programming language that builds on JavaScript by adding static type definitions. Developed and maintained by Microsoft, TypeScript compiles to plain JavaScript and runs anywhere JavaScript runs: in a browser, on Node.js, or in any other JavaScript runtime.

Fun Fact

TypeScript does not uphold the semVer standard with their version numbering.

What is TypeScript?

TypeScript extends JavaScript by adding type syntax to the language. This allows developers to:

  • Catch errors early during development rather than at runtime
  • Improve code quality through better tooling, refactoring, and IntelliSense
  • Enable better collaboration in teams by making code more self-documenting
  • Scale applications more effectively with confidence in large codebases

Key Benefits

  1. Static Type Checking: Identify potential bugs before your code runs
  2. Enhanced IDE Support: Better autocomplete, navigation, and refactoring
  3. Modern JavaScript Features: Use the latest ECMAScript features with confidence
  4. Gradual Adoption: Add types incrementally to existing JavaScript projects
  5. Rich Ecosystem: Leverage type definitions for thousands of JavaScript libraries

How TypeScript Works

TypeScript code is written in .ts (or <script lang="ts"> in vue) files and compiled to JavaScript using the TypeScript compiler (tsc). The compilation process removes all type annotations, producing clean, readable JavaScript that runs everywhere.

typescript
// TypeScript
function greet(name: string): string {
  return `Hello, ${name}!`;
}

// Compiled JavaScript
function greet(name) {
  return `Hello, ${name}!`;
}

Useful References

Report a problem:

Problems can be reported via Microsoft Teams in your team channel within the "IT - Codey" team.

Please include the following information:

Report type:
Docs problem report a bug instead →
Path:
/vnext/cookbook/the-stack/typescript.html
Message:

DESCRIBE THE PROBLEM BEFORE SUBMITTING TO CODEY

Last updated: