Advanced TypeScript programming projects : build 9 different apps with TypeScript 3 and JavaScript frameworks such as Angular, React, and Vue 9781788991018, 178899101X

Advanced TypeScript 3.0 Projects is a complete resource filled with a wide range of web-based projects to help you in ad

2,918 662 10MB

English Pages 408 Year 2019

Report DMCA / Copyright

DOWNLOAD FILE

Advanced TypeScript programming projects : build 9 different apps with TypeScript 3 and JavaScript frameworks such as Angular, React, and Vue
 9781788991018, 178899101X

Table of contents :
Cover
Title Page
Copyright and Credits
Dedication
About Packt
Contributors
Table of Contents
Preface
Chapter 1: 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 genericsMapping values using maps
Creating asynchronous code with promises and async/await
Creating UIs with Bootstrap
Summary
Questions
Chapter 2: Creating a Markdown Editor with TypeScript
Technical requirements
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 patternApplying the visitor pattern to our code
Deciding which tags to apply by using the chain-of-responsibility pattern
Bringing it all together
Summary
Questions
Further reading
Chapter 3: A React Bootstrap Personal Contacts Manager
Technical requirements
Understanding the project overview
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 responsiveOur 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
Summary
Questions
Further reading Chapter 4: The MEAN Stack --
Building a Photo GalleryTechnical requirements
The MEAN stack
Project overview
Getting started
Creating an Angular photo gallery with the MEAN stack
Understanding Angular
Creating our application
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
Back to our routing

Polecaj historie