About 400 results
Open links in new tab
  1. TypeScript: Documentation - Everyday Types

    In this chapter, we’ll cover some of the most common types of values you’ll find in JavaScript code, and explain the corresponding ways to describe those types in TypeScript.

  2. TypeScript: Documentation - Creating Types from Types

    By combining various type operators, we can express complex operations and values in a succinct, maintainable way. In this section we’ll cover ways to express a new type in terms of an existing type …

  3. TypeScript: Documentation - Do's and Don'ts

    Don’t ever use the types Number, String, Boolean, Symbol, or Object These types refer to non-primitive boxed objects that are almost never used appropriately in JavaScript code.

  4. TypeScript: Documentation - The Basics

    This is the default experience with TypeScript, where types are optional, inference takes the most lenient types, and there’s no checking for potentially null / undefined values.

  5. TypeScript: Documentation - JSDoc Reference

    Even though String is a type in TypeScript, old JSDoc often uses it to mean string. Besides, in TypeScript, the capitalized versions of primitive types are wrapper types — almost always a mistake …

  6. TypeScript: Documentation - Object Types

    Generic object types are often some sort of container type that work independently of the type of elements they contain. It’s ideal for data structures to work this way so that they’re re-usable across …

  7. TypeScript: JavaScript With Syntax For Types.

    Apply types to your JavaScript project incrementally, each step improves editor support and improves your codebase. Let's take this incorrect JavaScript code, and see how TypeScript can catch …

  8. TypeScript: Documentation - Symbols

    Symbols Starting with ECMAScript 2015, symbol is a primitive data type, just like number and string. symbol values are created by calling the Symbol constructor.

  9. TypeScript: Documentation - Type Compatibility

    While comparing primitive types and object types is relatively straightforward, the question of what kinds of functions should be considered compatible is a bit more involved.

  10. TypeScript: Documentation - TypeScript 2.0

    With TypeScript 2.0, the type checker analyses all possible flows of control in statements and expressions to produce the most specific type possible (the narrowed type) at any given location for …