TypeScript

TypeScript
ParadigmMulti-paradigm: functional, generic, imperative, object-oriented
Designed byMicrosoft
DeveloperMicrosoft
First appeared1 October 2012 (2012-10-01)[1]
Stable release
5.4.2[2] Edit this on Wikidata / 6 March 2024 (6 March 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] Because TypeScript is a superset of JavaScript, all JavaScript programs are syntactically valid TypeScript, but they can fail to type-check for safety reasons.

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 TypeScript 5.4 microsoft/TypeScript". 6 March 2024. Retrieved 19 March 2024.
  3. ^ "Type Compatibility". TypeScript. Retrieved 21 March 2018.
  4. ^ "The Early History of F#" (PDF). 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. 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. Retrieved 26 April 2015.
  7. ^ "TypeScript Programming with Visual Studio Code". code.visualstudio.com. Retrieved 12 February 2019.
  8. ^ "borisyankov/DefinitelyTyped". GitHub. Retrieved 26 April 2015.
  9. ^ Foley, Mary Jo (1 October 2012). "Microsoft takes the wraps off TypeScript, a superset of JavaScript". ZDNet. CBS Interactive. Retrieved 26 April 2015.
  10. ^ Somasegar, S. (1 October 2012). "Somasegar's blog". Microsoft. 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. 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.

From Wikipedia, the free encyclopedia · View on Wikipedia

Developed by Nelliwinne