更新时间:2021-06-24 13:27:46
coverpage
Title Page
Copyright and Credits
Advanced TypeScript Programming Projects
Dedication
About Packt
Why subscribe?
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Advanced TypeScript Features
Technical requirements
Building future-proof TypeScript with tsconfig
Introduction to advanced TypeScript features
Using different types with union types
Combining types with intersection types
Simplifying type declarations with type aliases
Assigning properties using object spread
Deconstructing objects with REST properties
Coping with a variable number of parameters using REST
AOP using decorators
Composing types using mixins
Using the same code with different types and using generics
Mapping values using maps
Creating asynchronous code with promises and async/await
Creating UIs with Bootstrap
Summary
Questions
Creating a Markdown Editor with TypeScript
Understanding the project overview
Getting started with a simple HTML project
Writing a simple markdown parser
Building our Bootstrap UI
Mapping our markdown tag types to HTML tag types
Representing our converted markdown using a markdown document
Updating markdown document using visitors
Understanding the visitor pattern
Applying the visitor pattern to our code
Deciding which tags to apply by using the chain-of-responsibility pattern
Bringing it all together
Further reading
A React Bootstrap Personal Contacts Manager
Getting started with the components
Creating a React Bootstrap project with TypeScript support
Creating our mock layout
Creating our application
Formatting our code using tslint
Adding Bootstrap support
React using tsx components
How React uses a virtual DOM to be more responsive
Our React App component
Displaying the personal details interface
Simplify updating values with binding
Supplying state to bind against
Validating user inputs and the use of validators
Validating the address
Validating the name
Validating the phone number
Applying validation in a React component
Creating and sending data to the IndexedDB database
Adding active record support to our state
Working with the database
Accessing the database from PersonalDetails
Enhancements
The MEAN Stack - Building a Photo Gallery
The MEAN stack
Project overview
Getting started
Creating an Angular photo gallery with the MEAN stack
Understanding Angular
App.Module.ts
Using Angular Material for our UI
Using Material to add navigation
Creating our first component – the FileUpload component
Previewing files using a service
Using the service in the dialog
The file upload component template
Introducing Express support into our application
Providing routing support
Introducing MongoDB