𝔖 Scriptorium
✦   LIBER   ✦

📁

Typescript Mini Reference: A Quick Guide to the Typescript Programming Language for Busy Coders: 4

✍ Scribed by Harry Yoon


Publisher
Coding Books Press
Year
2023
Tongue
English
Leaves
195
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Typescript is a better jаvascript, It is a statically typed, safe programming language, which uses more or less the same syntax as jаvascript. Typescript programs are compiled to jаvascript, and they can be run anywhere jаvascript is supported. It is widely used by professional jаvascript developers, for frontend development (e.g., Angular, React, and VueJS) as well as for backend development (e.g., Node.Js and Deno).

This book is a "mini" language reference on the Typescript programming language. We go through all essential features of Typescript (as of versions 4.8 and 4.9), and some new ECMAScript features, in this book.

Although it is written as a reference, however, you can read it more or less from beginning to end and you should be able to get the overall picture of the Typescript language if you have some prior experience with programming in Typescript or modern jаvascript (ES2015 and later).

Typescript’s marketing slogan, in the early days, used to be TypeScript is a superset of jаvascript. This phrase, when interpreted literally, does not mean very much. For one thing, a programming language is not a mathematical set, and hence one programming language cannot be a superset of another. Regardless, Typescript uses the same or similar jаvascript syntax in many parts of its grammar, including (almost) all statements and expressions.

Typescript’s extension over jаvascript is primarily limited to types. jаvascript is a dynamically and loosely typed language. It has pros and cons. For small projects, or for quick prototyping, dynamic languages like jаvascript or Python can be extremely convenient. On the other hand, when you work on bigger and longer-term projects, using statically typed languages tends to be increasingly more advantageous.

Typescript’s new slogan is TypeScript is jаvascript with syntax for types. And, it emphasizes the tooling aspect of the programming language, at any scale. Typescript is widely used with many jаvascript application frameworks such as Angular, React, and Vuejs, which are primarily intended for building large-scale jаvascript apps. In fact, Typescript got a big break, as a new language, when the Angular team adopted Typescript as their default programming language for Angular version 2.0 (and, onward). As the saying goes, the rest is history. As of this writing (January 2023), React Native, another jаvascript-based hybrid mobile app development framework, also adopted Typescript as their primary language.

The book covers:

Typescript development basics.
ES module system.
Basic JS/TS types. Type annotations.
Variable declarations. Type inference.
Algebraic data types. Generics.
Objects. Classes.
Function types. Arrow functions.
How to create new types from existing types.

✦ Table of Contents


logo
Hello, Welcome to EPUB Reader

Click button to select your book
Open EPUB book

This Online Web App is made by Neo Reader for experimental purpose, it is a very simple EPUB Reader. We recommend you try our Neo Reader for better experience.
Take a look now
neat reader pc

AD
Ultimate EPUB Reader

Totally free to try
Support multiple file types, such as EPUB, MOBI, AZW3, AZW, PDF and TXT.

Learn more about Neo Reader

General Ebook Solution
Preface
Dear Readers:
1. Introduction
2. Typescript Basics
2.1. What is Typescript?
2.2. Static Typing
2.2.1. Type annotations
2.2.2. Static type checking
2.2.3. Type inference
2.3. Notes on Development Process
2.4. The Typescript Compiler
2.5. Typescript JSON Configuration File
2.5.1. Top-level options
2.5.2. compilerOptions
2.5.3. strict
2.5.4. strictNullChecks
2.5.5. noImplicitAny
2.5.6. noImplicitThis
3. Module System
3.1. ES Modules
3.2. Typescript Modules
3.3. Module Exports
3.3.1. (Regular) exports
3.3.2. Default exports
3.4. Module Imports
3.4.1. Module import
3.4.2. import - from Declaration
3.4.3. Default import
3.4.4. Name list import
3.4.5. Namespace import
3.5. Typescript Namespaces
4. Variables
4.1. The const Declaration
4.2. The let Declaration
4.3. The var Declaration
5. Basic Types
5.1. Javascript Types
5.1.1. The typeof operator
5.1.2. The instanceof operator
5.2. Strict Equality
5.3. Primitive Types
5.3.1. The boolean, number, and string types
5.3.2. The bigint Type
5.3.3. The symbol type
5.4. Literal Types
5.5. The any Type
5.6. The unknown Type
5.7. The null and undefined Types
5.8. The never Type
5.9. The void Type
5.10. The object Type
5.11. Function Types
5.12. Array Types
5.13. Tuple Types
5.14. Enum Types
6. Type Aliases
7. Type Annotations
7.1. Variable Annotations
7.2. Function Annotations
8. Assertions
8.1. Type Assertions
8.2. Const Assertions
8.3. Non-Null Assertions
9. Generics
9.1. Why Generics?
9.2. Generic Functions
9.3. Generic Types
9.4. Generic Type Constraints
10. Arrays
10.1. Generic Array
10.1.1. Array creation
10.1.2. Array iteration
10.2. Generic ReadonlyArray
11. Algebraic Data Types
11.1. Tuples
11.1.1. Fixed-size tuples
11.1.2. Generic tuples
11.1.3. Variadic tuples
11.2. Readonly Tuples
11.3. Union Types
11.3.1. Narrowing
11.4. Discriminated Unions
11.5. Intersection Types
12. Function Types
12.1. Function Definitions
12.2. Arrow Function Definitions
12.3. Function Types
12.3.1. Function type expressions
12.3.2. Function return types
12.3.3. Generic function alias
12.3.4. The Function type
12.4. Parameter List
12.4.1. Parameter initializers
12.5. Optional Parameters
12.6. The Rest Parameter
12.7. Parameter Destructuring
12.8. The this Parameter
12.8.1. Global context
12.8.2. Function context
12.9. Typescript Function Overloading
12.9.1. Overload signatures vs the implementation signature
13. Object Types
13.1. Object Literal Types
13.1.1. The empty object literal type
13.2. Object Type Members
13.2.1. Optional properties
13.2.2. Readonly properties
13.3. Index Signatures
13.3.1. Typescript index signatures
13.4. Getters and Setters
13.5. Member Methods
13.5.1. Method overloading
13.6. Structural Subtyping
14. Interfaces
14.1. Interface Types
14.2. Extending Interfaces
15. Classes
15.1. The ECMAScript Class
15.1.1. Class declaration
15.1.2. Class body
15.1.3. Fields
15.1.4. Accessors
15.1.5. Methods
15.1.6. Constructors
15.1.7. Static blocks
15.1.8. Inheritance
15.2. The Typescript Class
15.2.1. Constructors
15.2.2. Member visibility
15.2.3. Parameter properties
15.3. Abstract Classes
15.4. Implementing Interfaces
15.4.1. Implementing multiple interfaces
15.5. Generic Classes
16. Type Narrowing
16.1. Control Flow Analysis
16.2. The typeof Type Guard
16.3. The instanceof Type Guard
16.4. The in Operator Narrowing
16.5. Discriminated Unions
17. Advanced Types
17.1. Template Literal Types
17.2. The typeof Type Operator
17.3. The keyof Type Operator
17.4. Indexed Access Types
17.5. Conditional Types
17.6. Mapped Types
Appendix A: How to Use This Book
About the Author
About the Series
Community Support


📜 SIMILAR VOLUMES


The TypeScript Workshop: A practical gui
✍ Ben Grynhaus, Jordan Hudgens, Rayon Hunte, Matthew Thomas Morgan, Wekoslav Stefa 📂 Library 📅 2021 🏛 Packt Publishing 🌐 English

<p><b>Broaden your skill set by learning TypeScript and applying your knowledge to build real-world applications</b></p><h4>Key Features</h4><ul><li>Quickly get started writing TypeScript code with hands-on exercises and activities</li><li>Develop new skills that can be applied at work or in your ow

Python Mini Reference 2022: A Quick Guid
✍ Harry Yoon 📂 Library 📅 2022 🏛 Coding Books Press 🌐 English

<span>Learn Python in a Weekend!</span><span><br><br>This book is an (informal) language reference on the Python programming language. Python is one of the most widely used languages in many different application areas. We go through all essential features of the modern Python programming language,

Python Mini Reference 2022: A Quick Guid
✍ Harry Yoon 📂 Library 📅 2022 🏛 Coding Books Press 🌐 English

<span>Learn Python in a Weekend!</span><span><br><br>This book is an (informal) language reference on the Python programming language. Python is one of the most widely used languages in many different application areas. We go through all essential features of the modern Python programming language,

TypeScript Programming Language
✍ TypeScript Publishing 📂 Library 📅 2019 🏛 TypeScript Publishing 🌐 English

TypeScript lets you write JavaScript the way you really want to. TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. TypeScript is pure object oriented with classes, interfaces and statically typed like C# or Java. The popular JavaScript framework Angular is written in

Mastering TypeScript : A Comprehensive G
✍ Eliza Rosewood 📂 Library 📅 2023 🏛 Ali Alakbar Mohammed Radhi 🌐 English

TypeScript is a powerful programming language that extends jаvascript, providing a statically typed environment for building large-scale web applications. This book offers a comprehensive guide to TypeScript, designed for both novice and experienced programmers alike. From its fundamental syntax to