🌐
TypeScript
typescriptlang.org β€Ί docs
TypeScript: The starting point for learning TypeScript
Downloadable syntax reference pages for different parts of everyday TypeScript code.
Playground
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.
Tools
A live environment for exploring, learning and sharing TypeScript code.
Download
Add TypeScript to your project, or install TypeScript globally
Handbook
If you are coming to TypeScript without a JavaScript background, with the intention of TypeScript being your first language, we recommend you first start reading the documentation on either the Microsoft Learn JavaScript tutorial or read JavaScript at the Mozilla Web Docs.

programming language, superset of JavaScript that compiles to JavaScript

TypeScript (TS) is a high-level programming language that adds static typing with optional type annotations to JavaScript. It is designed for developing large applications. It transpiles to JavaScript. It is developed by … Wikipedia
Factsheet
Family ECMAScript
Designed by Microsoft,
Anders Hejlsberg,
Luke Hoban
Factsheet
Family ECMAScript
Designed by Microsoft,
Anders Hejlsberg,
Luke Hoban
🌐
TypeScript
typescriptlang.org
TypeScript: JavaScript With Syntax For Types.
Let's take this incorrect JavaScript code, and see how TypeScript can catch mistakes in your editor. ... No editor warnings in JavaScript files This code crashes at runtime! ... trim(0, 10)Property 'trim' does not exist on type 'any[]'.2339Property 'trim' does not exist on type 'any[]'. ... Now TS has found a bad call. Arrays have slice, not trim. ... Describe the shape of objects and functions in your code. Making it possible to see documentation ...
Discussions

Where can I find documentation for TypeScript's built-in types and standard library? - Stack Overflow
I love working with TypesScript (as a former C# dev) and I spend hours every month browsing through the online documentation. However, I can't seem to find documentation about built-in types such ... More on stackoverflow.com
🌐 stackoverflow.com
Where is the syntax for TypeScript comments documented? - Stack Overflow
Is the syntax for TypeScript comments documented anywhere? And by any chance, does it now support the C# /// system? More on stackoverflow.com
🌐 stackoverflow.com
AI documentation writer for TS and JS in VSCode
Looks insane. Would it be hard to tweak it to, for example, jsdoc format for ts/js files? More on reddit.com
🌐 r/typescript
38
82
October 29, 2021
What tools do you use to generate docs for TS project?
Storybook is not only for React. Typescript and Vue https://medium.com/@almeynman/setup-vue-with-storybook-using-vue-cli-3-0-typescript-example-1be64a7cc7ac Microsoft has https://github.com/microsoft/tsdoc this instrument, for comments, but i think it's also useful More on reddit.com
🌐 r/typescript
6
5
December 2, 2019
🌐
Reddit
reddit.com β€Ί r/typescript β€Ί new to typescript - where is the best documentation
r/typescript on Reddit: New to typescript - Where is the best documentation
July 25, 2024 -

Hi everyone! I'm new to typescript. I've been programming for a very very long time, but I haven't touched javascript since the Internet Explorer 6 days. I'm having a bit of trouble finding documentation for some of the operators, and I'm hoping someone can give me some direction.

One example is "nullish coalescing" operator. I can find it in the release notes for typescript 3.7, but I can't find it in the official reference manual. Same thing goes for the spread operator (...).

I understand that typescript is compiled to javascript, and MDN's documentation is pretty good around these things, but I can't find a central location for the typescript language specification. Does such a thing exist? Could someone point me to it?

Other than searching around on the internet, what does everyone else do? I'm very much used to using reference manuals for this sort of thing.

Thanks to all!

🌐
React
react.dev β€Ί learn β€Ί typescript
Using TypeScript – React
The TypeScript handbook is the official documentation for TypeScript, and covers most key language features.
🌐
W3Schools
w3schools.com β€Ί typescript
TypeScript Tutorial
TypeScript is JavaScript with added syntax for types.
🌐
DevDocs
devdocs.io β€Ί typescript~5.1
DevDocs β€” TypeScript 5.1 documentation
TypeScript 5.1.3 API documentation with instant search, offline support, keyboard shortcuts, mobile version, and more.
Find elsewhere
🌐
TypeScript
typescriptlang.org β€Ί tsconfig
TypeScript: TSConfig Reference - Docs on every TSConfig option
From allowJs to useDefineForClassFields the TSConfig reference includes information about all of the active compiler flags setting up a TypeScript project.
🌐
MDN Web Docs
developer.mozilla.org β€Ί en-US β€Ί docs β€Ί Glossary β€Ί TypeScript
TypeScript - Glossary | MDN
TypeScript is a superset of JavaScript, meaning that everything available in JavaScript is also available in TypeScript, and that every JavaScript program is a syntactically legal TypeScript program.
🌐
TSDoc
tsdoc.org
What is TSDoc? | TSDoc
TypeDoc: an API reference generator that extracts member documentation from code comments Β· DocFX: an integrated pipeline that ingests API reference content for many different programming languages, but then applies its own Markdown renderer and custom tag parsing Β· API Extractor: a build tool that tracks TypeScript API review workflows and generates *.d.ts rollups for third-party SDKs
🌐
Node.js
nodejs.org β€Ί api β€Ί typescript.html
Modules: TypeScript | Node.js v25.2.1 Documentation
TypeScript features Β· Importing types without type keyword Β· Non-file forms of input Β· Source maps Β· Type stripping in dependencies Β· Paths aliases Β· Index Β· About this documentation Β· Usage and example Β· Index Β· Assertion testing Β· Asynchronous context tracking Β·
🌐
Supabase
supabase.com β€Ί docs β€Ί reference β€Ί javascript β€Ί typescript-support
JavaScript: TypeScript support | Supabase Docs
9 hours ago - supabase-js has TypeScript support for type inference, autocompletion, type-safe queries, and more.
🌐
NestJS
docs.nestjs.com
Documentation | NestJS - A progressive Node.js framework
Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).
🌐
Gnome
gjs-docs.gnome.org β€Ί typescript
DevDocs β€” TypeScript documentation
TypeScript 5.9.2 API documentation with instant search, offline support, keyboard shortcuts, mobile version, and more.
🌐
TypeDoc
typedoc.org
TypeDoc
TypeDoc converts comments in TypeScript's source code into HTML documentation or a JSON model.
🌐
GitHub
github.com β€Ί modelcontextprotocol β€Ί typescript-sdk
GitHub - modelcontextprotocol/typescript-sdk: The official TypeScript SDK for Model Context Protocol servers and clients
4 days ago - Model Context Protocol documentation Β· MCP Specification Β· Example Servers Β· Issues and pull requests are welcome on GitHub at https://github.com/modelcontextprotocol/typescript-sdk.
Starred by 10.9K users
Forked by 1.5K users
Languages Β  TypeScript 99.1% | JavaScript 0.9%
Top answer
1 of 5
357

Current

The TypeScript team, and other TypeScript involved teams, created a TSDoc specification. https://tsdoc.org/

Example straight from the docs:

export class Statistics {
  /**
   * Returns the average of two numbers.
   *
   * @remarks
   * This method is part of the {@link core-library#Statistics | Statistics subsystem}.
   *
   * @param x - The first input number
   * @param y - The second input number
   * @returns The arithmetic mean of `x` and `y`
   *
   * @beta
   */
  public static getAverage(x: number, y: number): number {
    return (x + y) / 2.0;
  }
}

Past

TypeScript uses JSDoc. e.g.

/** This is a description of the foo function. */
function foo() {
}

To learn jsdoc : https://jsdoc.app/

But you don't need to use the type annotation extensions in JSDoc.

You can (and should) still use other jsdoc block tags like @returns etc.

Just an example. Focus on the types (not the content).

JSDoc version (notice types in docs):

/**
 * Returns the sum of a and b
 * @param {number} a
 * @param {number} b
 * @returns {number}
 */
function sum(a, b) {
    return a + b;
}

TypeScript version (notice the re-location of types):

/**
 * Takes two numbers and returns their sum
 * @param a first input to sum
 * @param b second input to sum
 * @returns sum of a and b
 */
function sum(a: number, b: number): number {
    return a + b;
}
2 of 5
112

Update November 2020

A website is now online with all the TSDoc syntax available (and that's awesome): https://tsdoc.org/


For reference, old answer:

The right syntax is now the one used by TSDoc. It will allow you to have your comments understood by Visual Studio Code or other documentation tools.

A good overview of the syntax is available here and especially here. The precise spec should be "soon" written up.

Another file worth checking out is this one where you will see useful standard tags.

Note: you should not use JSDoc, as explained on TSDoc main page: Why can't JSDoc be the standard? Unfortunately, the JSDoc grammar is not rigorously specified but rather inferred from the behavior of a particular implementation. The majority of the standard JSDoc tags are preoccupied with providing type annotations for plain JavaScript, which is an irrelevant concern for a strongly-typed language such as TypeScript. TSDoc addresses these limitations while also tackling a more sophisticated set of goals.

🌐
Wikipedia
en.wikipedia.org β€Ί wiki β€Ί TypeScript
TypeScript - Wikipedia
1 week ago - 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.
🌐
Maurodatamapper
maurodatamapper.github.io β€Ί resources β€Ί client β€Ί typescript
TypeScript - Documentation
The TypeScript library that implements communication with the back-end server is available as a standalone repository for incorporation into other applications. For example other web interfaces, or back-end functionality using node.js. This is in fact the client library that the Mauro Data Mapper user interface uses. The GitHub repository is called mdm-resources and is available within the Mauro Data Mapper organisation. The API is documented using TypeDoc and the complete documentation can be found here.
🌐
webpack
webpack.js.org β€Ί guides β€Ί typescript
TypeScript | webpack
TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.