Cargando…

Learning TypeScript 2.x : Develop and maintain captivating web applications with ease, 2nd Edition.

TypeScript is an open source and cross-platform statically typed superset of JavaScript that compiles to plain JavaScript and runs in any browser or host. This book is a step-by-step guide that will take you through the use and benefits of TypeScript with the help of practical examples.

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Jansen, Remo H.
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham : Packt Publishing, 2018.
Edición:2nd ed.
Temas:
Acceso en línea:Texto completo
Tabla de Contenidos:
  • Cover; Title Page; Copyright and Credits; Dedication; Packt Upsell; Contributors; Table of Contents; Preface; Chapter 1: Introducing TypeScript; The TypeScript architecture; Design goals; TypeScript components; TypeScript language features; Types; Type inference and optional static type annotations; Variables, basic types, and operators; Variable scope (var, let, and const); Arithmetic operators; Comparison operators; Logical operators; Bitwise operators; Assignment operators; Spread operator; Flow control statements; The single-selection structure (if).
  • The double-selection structure (if ... else)The inline ternary operator ; The multiple-selection structure (switch); The expression is tested at the top of the loop (while); The expression is tested at the bottom of the loop (do ... while); Iterate on each object's properties (for ... in); Iterate values in an iterable (for ... of); Counter-controlled repetition (for); Functions; Classes; Interfaces; Namespaces; Putting everything together; Summary; Chapter 2: Working with Types; The TypeScript type system's characteristics; The line between TypeScript and JavaScript; Type inference.
  • Optional static type annotationsStructural type system; Core features of the TypeScript type system; Union types; Type aliases; Intersection types; Non-nullable types; The
  • strict mode; The typeof operator; Type guards; Custom type guards; Control flow analysis; Literal types; Discriminated unions; The never type; Enumerations; Object literals; Weak types; The keyof operator; Index signature; Local types; Type casting; Advanced features of the TypeScript type system; Generic types; Generic constraints; Mapped types; Lookup types; Mapped type modifiers; Conditional types; The infer keyword.
  • Built-in conditional typesThe polymorphic this type; Ambient declarations; Type declarations
  • d.ts; Summary; Chapter 3: Working with Functions; Working with functions in TypeScript; Function declarations and function expressions; Function types; Trailing commas in function arguments; Functions with optional parameters; Functions with default parameters; Functions with REST parameters; Function overloading; Specialized overloading signature; Function scope; Immediately invoked functions; Tag functions and tagged templates; Asynchronous programming in TypeScript.
  • Callbacks and higher-order functionsArrow functions; Callback hell; Promises; Covariant checking in callback parameters; Generators; Asynchronous functions
  • async and await; Asynchronous generators; Asynchronous iteration (for await ... of); Delegating to another generator (yield*); Summary; Chapter 4: Object-Oriented Programming with TypeScript; Classes; Strict property initialization; Inheritance; Depth of the inheritance tree (DIT); Access modifiers; The public access modifier; The private access modifier; The protected access modifier; Parameter properties; Class expressions.