Mastering TypeScript: Build enterprise-ready, modular web applications using TypeScript 4 and modern frameworks, 4th Edition
Book information
Description
This book is a guide to the TypeScript language, from basic concepts to advanced features, and will get you up and running quickly. You'll learn TypeScript programming in depth as you use popular application frameworks and utilize modern design patterns and architectural patterns to build modular, testable and enterprise-ready applications. Cover Copyright Contributors Table of Contents Preface Chapter 1: Up and Running Quickly A simple TypeScript IDE Using npm Hello TypeScript Template strings and JavaScript versions TypeScript project configuration Watching files for changes TypeScript basics Strong typing Basic types Inferred typing Duck typing Function signatures and void VS Code IntelliSense VS Code debugging Introducing third-party libraries Declaration files Summary Chapter 2: Exploring the Type System any, let, unions, and enums The any type Explicit casting The let keyword Const values Union types Type guards Type aliases Enums String enums Const enums More primitive types Undefined Null Conditional expressions Optional chaining Nullish coalescing Null or undefined operands Definite assignment Object Unknown Never Never and switch Object spread Spread precedence Spread with arrays Tuples Tuple destructuring Optional tuple elements Tuples and spread syntax Object destructuring Functions Optional parameters Default parameters Rest parameters Function callbacks Function signatures as parameters Function overrides Literals Summary Chapter 3: Interfaces, Classes, Inheritance, and Modules Interfaces Optional properties Interfaces are compiled away Interface naming Weak types The in operator keyof Classes The this keyword Implementing interfaces Class constructors Class modifiers JavaScript private fields Constructor parameter properties Readonly Get and set Static functions Static properties Namespaces Inheritance Interface inheritance Class inheritance The super function Function overriding Protected Abstract classes Abstract class methods instanceof Interfaces extending classes Modules Exporting modules Importing modules Module renaming Multiple exports Module namespaces Default exports Summary Chapter 4: Generics and Advanced Type Inference Generics Generic syntax Multiple generic types Constraining the type of T Using the type T Generic constraints Generic interfaces Creating new objects within generics Advanced type inference Mapped types Partial, Readonly, Record, and Pick Conditional types Conditional type chaining Distributed conditional types Conditional type inference Type inference from function signatures Type inference from arrays Standard conditional types Summary Chapter 5: Asynchronous Language Features Callbacks Promises Promise syntax Promise errors Returning values from Promises Promise return types Async and await Await syntax Await errors Await values Callbacks versus Promises versus async Summary Chapter 6: Decorators Decorator overview Decorator setup Decorator syntax Multiple decorators Types of decorators Decorator factories Exploring decorators Class decorators Property decorators Static property decorators Method decorators Using method decorators Parameter decorators Decorator metadata Using decorator metadata Summary Chapter 7: Integration with JavaScript Declaration files Global variables JavaScript code in HTML Finding declaration files Writing declaration files The module keyword Declaration file typing Function overloading Nested namespaces Classes Static properties and functions Abstract classes Generics Conditional types Conditional type inference Declaration file summary Integration compiler options The allowJs and outDir options Compiling JavaScript The declaration option Summary Chapter 8: Strict Compiler Options Nested configuration Strict Options strictNullChecks strictPropertyInitialization strictBindCallApply strictFunctionTypes no compiler options noImplicitAny noUnusedLocals and noUnusedParameters noImplicitReturns noFallthroughCasesInSwitch noImplicitThis Summary Chapter 9: Using Observables to Transform Data Introduction to Observables pipe and map Combining operators Avoid swallowing values Time-based Observables Observable errors catchError Observables returning Observables mergeMap concatMap forkJoin Observable Subject Summary Chapter 10: Test-Driven Development The testing paradigm Unit, integration, and acceptance tests Unit tests Integration tests Acceptance tests Unit testing frameworks Jest ts-jest Watch mode Grouping tests Forcing and skipping tests Matchers Test setup and teardown Data-driven tests Jest mocks Jest spies Spies returning values Asynchronous tests Using done Using async await HTML-based tests DOM events Protractor Selenium Finding page elements Summary Chapter 11: Angular Angular setup Application structure Angular modules Angular Material A shared module An Angular application Angular DOM events Angular EventEmitter Angular services Angular Dependency Injection Child components Angular forms Reactive forms Reactive form templates Reading form values Angular unit testing Unit testing forms Reacting to domain events Summary Chapter 12: React Introduction to React React setup JSX JSX and logic React props React event handling React state A React application Application overview Mechanical keyboard switches Application components The CollectionView component The ItemView component The DetailView component The App component React forms Summary Chapter 13: Vue Introduction to Vue Vue setup Component structure Child components and props Component state Component events Computed props, conditionals, and loops A Vue application Application overview Material Design for Bootstrap App component ShoppingCart component ItemView component CheckoutView component ItemTotalView component Summary Chapter 14: Node and Express Express introduction Express setup Express router Express configuration An Express application Express templating Handlebars configuration Using templates Static files Express forms Express session data and redirects Summary Chapter 15: An AWS Serverless API Serverless setup AWS Lambda architecture Installing the SAM CLI Initializing a SAM application Generated structure Deploying a SAM application Building an API DynamoDB tables NoSQL Workbench Application API endpoints A Lambda function Compiling Lambdas Running Lambdas locally Lambda path parameters Processing database records API summary Summary Chapter 16: Micro Front-ends Design concepts Micro front-end mechanisms The iframe technique The JavaScript technique The Registry technique What we will use Communication mechanisms Domain events The Event Bus Building a micro front-end application The global Event Bus Building a module Module typing React updates Loading data from an API React domain events Vue updates Vue domain events Fetching data in Vue Raising Events Angular micro front-end Micro front-end DOM Containers Rendering the React front-end Rendering the Vue front-end Angular domain events Our micro front-end application Thoughts on micro front-ends Summary Packtpage Other Books You May Enjoy Index
Similar books
Mastering TypeScript: Build enterprise-ready, modular web applications using TypeScript 4 and modern frameworks, 4th Edition. Code
2021 · ZIP
Mastering TypeScript: Build enterprise-ready, modular web applications using TypeScript 4 and modern frameworks, 4th Edition
2021 · EPUB
Mastering TypeScript - Build enterprise-ready, industrial strength web applications using TypeScript and leading JavaScript Frameworks
2015 · PDF
MySQL® Notes for Professionals book
2018 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36
2010 · PDF
THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.
1858 · PDF