TypeScript

From WikiMD's Food, Medicine & Wellness Encyclopedia

Typescript

TypeScript is an open-source programming language developed and maintained by Microsoft. It is a strict syntactical superset of JavaScript and adds optional static typing to the language. TypeScript is designed for the development of large applications and transcompiles to JavaScript.

History[edit | edit source]

TypeScript was first made public in October 2012, after two years of internal development at Microsoft. The language was created by Anders Hejlsberg, who is also known for his work on the C# language. The first stable version, TypeScript 1.0, was released in 2014.

Features[edit | edit source]

TypeScript offers several features that are not available in JavaScript, including:

  • **Static Typing**: TypeScript allows developers to specify types for variables, function parameters, and return values, which can help catch errors at compile time.
  • **Type Inference**: Even if types are not explicitly specified, TypeScript can infer them based on the code.
  • **Interfaces**: TypeScript supports interfaces, which can be used to define the shape of an object.
  • **Enums**: TypeScript includes support for enumerated types.
  • **Namespaces**: TypeScript provides namespaces to organize code into logical groups and prevent name collisions.
  • **Generics**: TypeScript supports generics, which allow for the creation of reusable components that work with any data type.
  • **Modules**: TypeScript supports ES6 modules, which can be used to organize code into separate files and import/export functionality.

Compilation[edit | edit source]

TypeScript code is transcompiled into JavaScript using the TypeScript compiler, `tsc`. The compiler can be configured using a `tsconfig.json` file, which specifies the root files and the compiler options required to compile the project.

Adoption[edit | edit source]

TypeScript has been adopted by many large-scale projects and companies, including Angular, Vue.js, and React. It is also used by companies like Google, Airbnb, and Slack.

Development Tools[edit | edit source]

TypeScript is supported by various development tools, including:

  • **Visual Studio Code**: A popular code editor developed by Microsoft, which has built-in support for TypeScript.
  • **WebStorm**: An integrated development environment (IDE) developed by JetBrains, which supports TypeScript.
  • **Atom**: A text editor developed by GitHub, which can be extended to support TypeScript through plugins.

See Also[edit | edit source]

References[edit | edit source]

External Links[edit | edit source]


Wiki.png

Navigation: Wellness - Encyclopedia - Health topics - Disease Index‏‎ - Drugs - World Directory - Gray's Anatomy - Keto diet - Recipes

Search WikiMD


Ad.Tired of being Overweight? Try W8MD's physician weight loss program.
Semaglutide (Ozempic / Wegovy and Tirzepatide (Mounjaro / Zepbound) available.
Advertise on WikiMD

WikiMD is not a substitute for professional medical advice. See full disclaimer.

Credits:Most images are courtesy of Wikimedia commons, and templates Wikipedia, licensed under CC BY SA or similar.

Contributors: Prab R. Tumpati, MD