TypeScript

From WikiMD's 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]


JavaScript code.png
   This article is a Programming language-related stub. You can help WikiMD by expanding it!


WikiMD
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's Wellness Encyclopedia

Let Food Be Thy Medicine
Medicine Thy Food - Hippocrates

Medical Disclaimer: WikiMD is not a substitute for professional medical advice. The information on WikiMD is provided as an information resource only, may be incorrect, outdated or misleading, and is not to be used or relied on for any diagnostic or treatment purposes. Please consult your health care provider before making any healthcare decisions or for guidance about a specific medical condition. WikiMD expressly disclaims responsibility, and shall have no liability, for any damages, loss, injury, or liability whatsoever suffered as a result of your reliance on the information contained in this site. By visiting this site you agree to the foregoing terms and conditions, which may from time to time be changed or supplemented by WikiMD. If you do not agree to the foregoing terms and conditions, you should not enter or use this site. 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