자료유형 | 단행본 |
---|---|
서명/저자사항 | TypeScript 3. 0 Quick Start Guide : the Easiest Way to Learn TypeScript. [electronic resource]. |
개인저자 | Desjardins, Patrick. |
발행사항 | Birmingham: Packt Publishing Ltd, 2018. |
형태사항 | 1 online resource (149 pages). |
기타형태 저록 | Print version: Desjardins, Patrick. TypeScript 3. 0 Quick Start Guide : The Easiest Way to Learn TypeScript. Birmingham : Packt Publishing Ltd, ©2018 9781789345575 |
ISBN | 9781789347937 1789347939 |
일반주기 |
Generic code to increase reusability.
|
내용주기 | Cover; Title Page; Copyright and Credits; Packt Upsell; Contributors; Table of Contents; Preface; Chapter 1: Getting Started with TypeScript; Grunt; Gulp; Webpack; NPM/CLI; TypeScript compiler; Files location; rootDir and outDir; baseUrl and paths; sourceRoot and sourceMap and mapRoot; Files and include and exclude; Outfile; Type; typeRoots and types; Declaration and declarationdir; Configuration file; Module and ModuleResolution; ECMAScript; Target; Lib; Compiler strictness; Strict; StrictFunctionTypes; StrictPropertyInitialization and StricNullChecks; Summary. Chapter 2: Onboarding Types with PrimitiveThe difference between var, let, and const; Declaring with var; Declaring with let; const; Enhancing primitives with TypeScript; Number; String; Boolean; Null; Undefined; Symbol; Non-primitive; What is void?; The reasons to avoid using any type; Usage of the never type; Unknown type to have a stricter any type; Enforcing a type in a list; Defining a conscribed set of constants with enum; String literal and its difference compared to a string; Crafting a typed function; How to be strongly typed without specifying the type; Summary. Chapter 3: Unleashing the Power of Type with ObjectsHow to strongly type a set/dictionary with an index signature; TypeScript and map; The differences between index signature and a map; The differences between object and Object; When to use object, Object, or any; What is an object literal?; How to create a constructed object; The differences between an explicit type and a cast; Variable with many types; Combining type with intersect; Intersecting with something other than a type; Intersecting with an optional type; Merge type with inheritance; The differences between type and interface. Destructuring a type and an arrayTuple; The differences between declare and let/const/var; Summary; Chapter 4: Transforming Your Code into Object-Oriented; What is a class and how do we define one?; How type comes into play with a class's constructor; What is encapsulation using public, private, and protected; Reducing the definition of a field with a value set at construction time; What is static?; Use cases for a non-public constructor; Using an object from a class versus an object literal; How an interface can be useful in object-oriented; Bringing abstraction with an abstract class. How to have a property that is read-onlyEnforcing a specific constructor from an interface; Summary; Chapter 5: Scoping Variables with Different Patterns; Comparing at runtime and design time with typeof; Differentiating undefined from null; Getting the type of element in a union ; The limitations of instanceof; Using of a discriminator for type identification; The user-defined guard pattern; The reason to cast a type; What is a type assertion?; Comparing classes; Narrowing type for function with a union in signatures; Summary; Chapter 6: Reusing Code Through Generic. |
요약 | TypeScript is designed for development of large applications and can be used to develop JavaScript applications for both client-side and server-side execution. This book is the ideal introduction to TypeScript, covering both the basics and the techniques you need to build your own applications. |
일반주제명 | Computer programming. TypeScript (Computer program language) Computers --Internet --Application Development. Computers --Web --Web Programming. Web programming. Computers --Programming Languages --JavaScript. Programming & scripting languages: general. Computer programming. TypeScript (Computer program language) |
언어 | 영어 |
바로가기 |