Description |
1 online resource (449 pages) |
Contents |
Cover; Title Page; Copyright and Credits; Dedication; Packt Upsell; Contributors; Table of Contents; Preface; Chapter 1: Introduction to TypeScript; Basics and installation; Adding types to JavaScript; Using JavaScript of the future now!; Installing the Visual Studio 2017 TypeScript SDK; Installation of Node.js-based TypeScript compiler; Adding TypeScript to your web projects; Your first TypeScript file; Running and debugging TypeScript code; TypeScript compiler options; Specifying parameters for the TypeScript compiler; TypeScript configuration file; Basic types; TypeScript type system. |
|
Any and unknownStrings, numbers, and Booleans; The null and undefined subtypes; Basics of union types; void; never; Enums; Declarations and scoping ; Declarations; Obligatoriness of declarations and noImplicitAny; Variable scoping; Expressions -- type assertions, and string interpolation; Summary; Questions; Further reading; Chapter 2: Complex Types and Functions; Technical requirements; Arrays and tuples; Array declaration; Tuples; Interfaces and type inference; Interfaces basics; Readonly properties; Optional properties; Excess property check; Defining function properties in interfaces. |
|
Indexable typesInterface inheritance; Operations on types; Intersection types; Union types and type guards; Discriminated unions; Destructuring and spreads; Array destructuring; Array spreads; Tuples destructuring; Object destructuring; Object spreads; Functions; Anonymous functions and function types; Optional arguments and destructuring; Function overloads; Arrow functions; Summary; Questions; Further reading; Chapter 3: DOM Manipulation; Technical requirements; DOM types; TypeScript predefined declarations; DOM basic types; HTML specific types; Basic DOM operations. |
|
DOM manipulation utilitiesRemoving an item; Adding a new item; Declaration files and JavaScript libraries; Where to find declaration files; How to use TypeScript declaration files; DOM operations with jQuery; Summary; Questions; Further reading; Chapter 4: Using Classes and Interfaces; Technical requirements; Classes; Constructors; Members definition and modifiers; Implicit property definition; Accessors; Static members and static parts of a class; What is the type of a class object?; Inheriting from a class and implementing interfaces; Implementing interfaces ; Inheriting from a class. |
|
Abstract classes and methodsModular design with inheritance, interfaces, and abstract classes; Advanced type-compatibility ; Summary; Questions; Further reading; Chapter 5: Generics; Technical requirements; Generic functions and interfaces; A generic function for aggregating array elements; Generic classes; Generic constraints; Type constraints; Creating instances of generic variables; The keyof constraints; Summary; Questions; Chapter 6: Namespaces and Modules; Technical requirements; Namespaces; DOM manipulation re-engineered with namespaces; Pitfalls of namespaces and ES6 modules. |
Note |
Exporting module symbols. |
Summary |
Writing clean, object-oriented code in JavaScript gets trickier and complex as the size of the project grows. This is where Typescript comes into the picture; it lets you write pure object-oriented code with ease, giving it the upper hand over JavaScript. This book introduces you to basic TypeScript concepts by gradually modifying standard ... |
Local Note |
eBooks on EBSCOhost EBSCO eBook Subscription Academic Collection - North America |
Subject |
TypeScript (Computer program language)
|
|
Programming & scripting languages: general. |
|
Computers -- Programming Languages -- C#. |
|
Computers -- Programming Languages -- JavaScript. |
|
TypeScript (Computer program language) |
Other Form: |
Print version: Abbruzzese, Francesco. Hands-On TypeScript for C# and . NET Core Developers : Transition from C# to TypeScript 3. 1 and Build Applications with ASP. NET Core 2. Birmingham : Packt Publishing Ltd, ©2018 9781789130287 |
ISBN |
1789133327 |
|
9781789133325 (electronic bk.) |
|
9781789130287 print |
|