TypeScript

TypeScript
ParadigmMulti-paradigm: functional, generic, imperative, object-oriented
Designed byMicrosoft
DeveloperMicrosoft
First appeared1 October 2012; 12 years ago (2012-10-01)[1]
Stable release
5.6.3[2] Edit this on Wikidata / 9 October 2024; 45 days ago (9 October 2024)
Typing disciplineDuck, gradual, structural[3]
LicenseApache License 2.0
Filename extensions.ts, .tsx, .mts, .cts
Websitewww.typescriptlang.org
Influenced by
C#, F#,[4] Java, JavaScript, ActionScript[5]
Influenced
AtScript, AssemblyScript, ArkTS

TypeScript is a free and open-source high-level programming language developed by Microsoft that adds static typing with optional type annotations to JavaScript. It is designed for the development of large applications and transpiles to JavaScript.[6].

TypeScript may be used to develop JavaScript applications for both client-side and server-side execution (as with Node.js, Deno or Bun). Multiple options are available for transpilation. The default TypeScript Compiler can be used,[7] or the Babel compiler can be invoked to convert TypeScript to JavaScript.

TypeScript supports definition files that can contain type information of existing JavaScript libraries, much like C++ header files can describe the structure of existing object files. This enables other programs to use the values defined in the files as if they were statically typed TypeScript entities. There are third-party header files for popular libraries such as jQuery, MongoDB, and D3.js. TypeScript headers for the Node.js library modules are also available, allowing development of Node.js programs within TypeScript.[8]

The TypeScript compiler is itself written in TypeScript and compiled to JavaScript. It is licensed under the Apache License 2.0. Anders Hejlsberg, lead architect of C# and creator of Delphi and Turbo Pascal, has worked on the development of TypeScript.[9][10][11][12]

  1. ^ "TypeScript". CodePlex. Archived from the original on 3 April 2015. Retrieved 26 April 2015.
  2. ^ "Release 5.6.3". 9 October 2024. Retrieved 27 October 2024.
  3. ^ "Type Compatibility". TypeScript. Archived from the original on 12 March 2018. Retrieved 21 March 2018.
  4. ^ "The Early History of F#" (PDF). Archived (PDF) from the original on 9 August 2024. Retrieved 5 February 2024. TypeScript was directly influenced by F#: one of the originators of TypeScript was Luke Hoban, who began TypeScript (then called Strada) immediately after working on F# 2.0. Recently he noted the influence of F# on early parts of the TypeScript design [Hoban 2017].
  5. ^ Nelson, Gary (28 April 2020). "How ActionScript foreshadowed TypeScript". Medium. Archived from the original on 9 August 2024. Retrieved 9 July 2022.
  6. ^ Bright, Peter (3 October 2012). "Microsoft TypeScript: the JavaScript we need, or a solution looking for a problem?". Ars Technica. Condé Nast. Archived from the original on 9 October 2018. Retrieved 26 April 2015.
  7. ^ "TypeScript Programming with Visual Studio Code". code.visualstudio.com. Archived from the original on 22 September 2022. Retrieved 12 February 2019.
  8. ^ "borisyankov/DefinitelyTyped". GitHub. Archived from the original on 1 November 2015. Retrieved 26 April 2015.
  9. ^ Foley, Mary Jo (1 October 2012). "Microsoft takes the wraps off TypeScript, a superset of JavaScript". ZDNet. CBS Interactive. Archived from the original on 13 November 2014. Retrieved 26 April 2015.
  10. ^ Somasegar, S. (1 October 2012). "Somasegar's blog". Microsoft. Archived from the original on 22 April 2015. Retrieved 26 April 2015.
  11. ^ Baxter-Reynolds, Matt (1 October 2012). "Microsoft TypeScript: Can the father of C# save us from the tyranny of JavaScript?". ZDNet. Archived from the original on 3 August 2014. Retrieved 26 April 2015.
  12. ^ Jackson, Joab (1 October 2012). "Microsoft Augments Javascript for Large-scale Development". CIO. IDG Enterprise. Archived from the original on 17 December 2013. Retrieved 26 April 2015.