Atjaunināt sīkdatņu piekrišanu

Learning Typescript: Enhance Your Web Development Skills Using Type-Safe JavaScript [Mīkstie vāki]

4.05/5 (70 ratings by Goodreads)
  • Formāts: Paperback / softback, 200 pages
  • Izdošanas datums: 17-Jun-2022
  • Izdevniecība: O'Reilly Media
  • ISBN-10: 1098110331
  • ISBN-13: 9781098110338
Citas grāmatas par šo tēmu:
  • Mīkstie vāki
  • Cena: 55,34 €*
  • * ši ir gala cena, t.i., netiek piemērotas nekādas papildus atlaides
  • Standarta cena: 65,11 €
  • Ietaupiet 15%
  • Grāmatu piegādes laiks ir 3-4 nedēļas, ja grāmata ir uz vietas izdevniecības noliktavā. Ja izdevējam nepieciešams publicēt jaunu tirāžu, grāmatas piegāde var aizkavēties.
  • Daudzums:
  • Ielikt grozā
  • Piegādes laiks - 4-6 nedēļas
  • Pievienot vēlmju sarakstam
  • Formāts: Paperback / softback, 200 pages
  • Izdošanas datums: 17-Jun-2022
  • Izdevniecība: O'Reilly Media
  • ISBN-10: 1098110331
  • ISBN-13: 9781098110338
Citas grāmatas par šo tēmu:
TypeScript has conquered the world of JavaScript: it's one of the world's fastest growing and most popular languages across developer surveys, widely used in consumer and business companies alike, and frequently credited for helping massive web applications scale. But what is TypeScript? How does it work, why does it work, and how can we use it?

Learning TypeScript takes beginner to intermediate JavaScript programmers from knowing nothing about "types" or a "type system" to full mastery of the fundamentals of TypeScript. It's more than a means to find bugs and typos--it's a useful system for declaring the way our JavaScript should work and helping us stick to it. You'll learn how TypeScript:

  • interacts with JavaScript
  • analyzes and understands code
  • augments your existing development pattern
  • helps you document your code
  • works with IDEs to provide refactoring tools
  • assists local development in refactoring code
  • helps you develop more quickly with fewer bugs

Preface xvii
Part I Concepts
1 From JavaScript to TypeScript
3(14)
History of JavaScript
3(1)
Vanilla JavaScript's Pitfalls
4(1)
Costly Freedom
4(1)
Loose Documentation
4(1)
Weaker Developer Tooling
5(1)
TypeScript!
6(1)
Getting Started in the TypeScript Playground
6(1)
TypeScript in Action
6(1)
Freedom Through Restriction
7(1)
Precise Documentation
8(1)
Stronger Developer Tooling
8(2)
Compiling Syntax
10(1)
Getting Started Locally
10(1)
Running Locally
11(1)
Editor Features
12(1)
What TypeScript Is Not
12(1)
A Remedy for Bad Code
12(1)
Extensions to JavaScript (Mostly)
13(1)
Slower Than JavaScript
13(1)
Finished Evolving
14(1)
Summary
14(3)
2 The Type System
17(12)
What's in a Type?
17(2)
Type Systems
19(1)
Kinds of Errors
20(1)
Assignability
21(1)
Understanding Assignability Errors
22(1)
Type Annotations
22(2)
Unnecessary Type Annotations
24(1)
Type Shapes
24(1)
Modules
25(2)
Summary
27(2)
3 Unions and Literals
29(14)
Union Types
29(1)
Declaring Union Types
30(1)
Union Properties
30(1)
Narrowing
31(1)
Assignment Narrowing
31(1)
Conditional Checks
32(1)
Typeof Checks
33(1)
Literal Types
33(2)
Literal Assignability
35(1)
Strict Null Checking
36(1)
The Billion-Dollar Mistake
36(1)
Truthiness Narrowing
37(1)
Variables Without Initial Values
38(1)
Type Aliases
39(1)
Type Aliases Are Not JavaScript
39(1)
Combining Type Aliases
40(1)
Summary
40(3)
4 Objects
43(18)
Object Types
43(1)
Declaring Object Types
44(1)
Aliased Object Types
45(1)
Structural Typing
45(1)
Usage Checking
46(1)
Excess Property Checking
47(1)
Nested Object Types
48(2)
Optional Properties
50(1)
Unions of Object Types
51(1)
Inferred Object-Type Unions
51(1)
Explicit Object-Type Unions
52(1)
Narrowing Object Types
53(1)
Discriminated Unions
53(1)
Intersection Types
54(1)
Dangers of Intersection Types
55(2)
Summary
57(4)
Part II Features
5 Functions
61(14)
Function Parameters
61(1)
Required Parameters
62(1)
Optional Parameters
63(1)
Default Parameters
64(1)
Rest Parameters
64(1)
Return Types
65(1)
Explicit Return Types
66(1)
Function Types
67(1)
Function Type Parentheses
68(1)
Parameter Type Inferences
69(1)
Function Type Aliases
69(1)
More Return Types
70(1)
Void Returns
70(2)
Never Returns
72(1)
Function Overloads
72(1)
Call-Signature Compatibility
73(1)
Summary
74(1)
6 Arrays
75(12)
Array Types
76(1)
Array and Function Types
76(1)
Union-Type Arrays
76(1)
Evolving Any Arrays
77(1)
Multidimensional Arrays
78(1)
Array Members
78(1)
Caveat: Unsound Members
79(1)
Spreads and Rests
79(1)
Spreads
79(1)
Spreading Rest Parameters
80(1)
Tuples
80(1)
Tuple Assignability
81(2)
Tuple Inferences
83(2)
Summary
85(2)
7 Interfaces
87(16)
Type Aliases Versus Interfaces
87(2)
Types of Properties
89(1)
Optional Properties
89(1)
Read-Only Properties
90(1)
Functions and Methods
91(1)
Call Signatures
92(1)
Index Signatures
93(3)
Nested Interfaces
96(1)
Interface Extensions
97(1)
Overridden Properties
98(1)
Extending Multiple Interfaces
99(1)
Interface Merging
99(1)
Member Naming Conflicts
100(1)
Summary
101(2)
8 Classes
103(22)
Class Methods
103(1)
Class Properties
104(1)
Function Properties
105(1)
Initialization Checking
106(2)
Optional Properties
108(1)
Read-Only Properties
108(1)
Classes as Types
109(2)
Classes and Interfaces
111(1)
Implementing Multiple Interfaces
112(2)
Extending a Class
114(1)
Extension Assignability
114(2)
Overridden Constructors
116(1)
Overridden Methods
117(1)
Overridden Properties
118(1)
Abstract Classes
119(1)
Member Visibility
120(2)
Static Field Modifiers
122(1)
Summary
123(2)
9 Type Modifiers
125(16)
Top Types
125(1)
Any, Again
125(1)
Unknown
126(1)
Type Predicates
127(2)
Type Operators
129(1)
Keyof
129(2)
Typeof
131(1)
Type Assertions
132(1)
Asserting Caught Error Types
133(1)
Non-Null Assertions
134(1)
Type Assertion Caveats
135(2)
Const Assertions
137(1)
Literals to Primitives
137(2)
Read-Only Objects
139(1)
Summary
140(1)
10 Generics
141(24)
Generic Functions
142(1)
Explicit Generic Call Types
143(1)
Multiple Function Type Parameters
144(1)
Generic Interfaces
145(1)
Inferred Generic Interface Types
146(1)
Generic Classes
147(1)
Explicit Generic Class Types
148(1)
Extending Generic Classes
149(1)
Implementing Generic Interfaces
150(1)
Method Generics
151(1)
Static Class Generics
152(1)
Generic Type Aliases
152(1)
Generic Discriminated Unions
153(1)
Generic Modifiers
154(1)
Generic Defaults
154(1)
Constrained Generic Types
155(1)
Keyof and Constrained Type Parameters
156(1)
Promises
157(1)
Creating Promises
157(1)
Async Functions
158(1)
Using Generics Right
159(1)
The Golden Rule of Generics
159(1)
Generic Naming Conventions
160(1)
Summary
161(4)
Part III Usage
11 Declaration Files
165(16)
Declaration Files
165(1)
Declaring Runtime Values
166(2)
Global Values
168(1)
Global Interface Merging
168(1)
Global Augmentations
169(1)
Built-In Declarations
170(1)
Library Declarations
170(2)
DOM Declarations
172(1)
Module Declarations
173(1)
Wildcard Module Declarations
174(1)
Package Types
174(1)
Declaration
174(1)
Dependency Package Types
175(1)
Exposing Package Types
176(1)
Definitely Typed
177(1)
Type Availability
178(1)
Summary
179(2)
12 Using IDE Features
181(18)
Navigating Code
182(1)
Finding Definitions
183(1)
Finding References
184(1)
Finding Implementations
185(1)
Writing Code
186(1)
Completing Names
186(1)
Automatic Import Updates
187(1)
Code Actions
188(3)
Working Effectively with Errors
191(1)
Language Service Errors
192(5)
Summary
197(2)
13 Configuration Options
199(36)
TSC Options
199(1)
Pretty Mode
200(1)
Watch Mode
200(1)
TSConfig Files
201(1)
TSC --init
202(1)
CLI Versus Configuration
202(1)
File Inclusions
203(1)
Include
203(1)
Exclude
204(1)
Alternative Extensions
204(1)
JSX Syntax
204(2)
Resolvejsonmodule
206(1)
Emit
207(1)
OutDir
207(1)
Target
208(1)
Emitting Declarations
209(1)
Source Maps
210(2)
Noemit
212(1)
Type Checking
212(1)
Lib
212(1)
Skiplibcheck
213(1)
Strict Mode
213(5)
Modules
218(1)
Module
219(1)
Module Resolution
219(1)
Interoperability with Common JS
220(1)
Isolated Modules
221(1)
JavaScript
222(1)
allowjs
222(1)
checkjs
223(1)
JSDoc Support
224(1)
Configuration Extensions
225(1)
Extends
225(2)
Configuration Bases
227(1)
Project References
227(1)
composite
228(1)
References
229(1)
Build Mode
229(2)
Summary
231(4)
Part IV Extra Credit
14 Syntax Extensions
235(18)
Class Parameter Properties
236(2)
Experimental Decorators
238(1)
Enums
239(2)
Automatic Numeric Values
241(1)
String-Valued Enums
242(1)
Const Enums
243(1)
Namespaces
244(1)
Namespace Exports
245(2)
Nested Namespaces
247(1)
Namespaces in Type Definitions
248(1)
Prefer Modules Over Namespaces
248(1)
Type-Only Imports and Exports
249(2)
Summary
251(2)
15 Type Operations
253(20)
Mapped Types
253(1)
Mapped Types from Types
254(2)
Changing Modifiers
256(2)
Generic Mapped Types
258(1)
Conditional Types
259(1)
Generic Conditional Types
260(1)
Type Distributivity
261(1)
Inferred Types
262(1)
Mapped Conditional Types
263(1)
never
263(1)
Never and Intersections and Unions
263(1)
Never and Conditional Types
264(1)
Never and Mapped Types
264(1)
Template Literal Types
265(2)
Intrinsic String Manipulation Types
267(1)
Template Literal Keys
267(1)
Remapping Mapped Type Keys
268(2)
Type Operations and Complexity
270(1)
Summary
271(2)
Glossary 273(8)
Index 281
Josh Goldberg is a staff frontend developer at Codecademy on its Web Platform team, where he spearheads the company's usage of TypeScript and helped create its Learn TypeScript course. He contributes regularly to TypeScript and open source projects in its ecosystem such as typescript-eslint and TypeStat. His passions range from static analysis to meta-languages to recreating retro games in the browser. Also cats.