
Unleashing the Power of TypeScript
Beschreibung
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
If you're a JavaScript developer struggling to get to grips with TypeScript or use it effectively in your projects, this book will guide you in making the most of this powerful language and its latest features, and help you overcome some common misunderstandings and pitfalls.
TypeScript 5.0 is a major advancement to the user-friendliness and flexibility of the language. It nudges us toward better coding practices, promotes cleaner code, and catches potential errors before they become a headache. It's a great time to start using TypeScript, but if you're a JavaScript developer struggling to get to grips with the language or use it effectively in your projects, this short book is for you. It will guide you in making the most of this powerful language and its latest features, and help you overcome some common misunderstandings and pitfalls.
It covers:
- Simplifying Reducers in React with TypeScript
- A Gentle Introduction to Generics in TypeScript
- Navigating the Perils and Pitfalls of Using React's Context API with TypeScript
- Extending DOM Elements and Creating Polymorphic Components
- A Guided Tour of the Three Biggest Features in TypeScript 5.0
This book is for intermediate-level JavaScript developers who want to get to grips with the powerful features that TypeScript offers.
Weitere Details
Person
Inhalt
- Unleashing the Power of TypeScript
- Notice of Rights
- Notice of Liability
- Trademark Notice
- About SitePoint
- About the Author
- Preface
- Who Should Read This Book?
- Conventions Used
- Code Samples
- Tips, Notes, and Warnings
- Supplementary Materials
- Chapter 1: Simplifying Reducers in React with TypeScript
- Reducer Basics
- Adding Types to Our Reducer
- Adding Payloads to Actions
- Using Unions
- Removing the Default Case in the Reducer
- Dealing with Different Kinds of Actions
- Using Unions for Action Types
- Using Our Reducer in a React Component
- Conclusion
- Chapter 2: A Gentle Introduction to Generics in TypeScript
- What Are Generics?
- A Word on Naming Generics
- Extending Types in Generics
- Using Generics in Functions
- A Word on Using Generics with JSX
- Inferring Generics
- Taking It a Step Further
- Using Generics with Classes
- Conclusion
- Chapter 3: Navigating the Perils and Pitfalls of Using React's Context API with TypeScript
- The Fundamental Problem
- A Rejected Solution: Use any
- A Feasible Solution: Use a Type Assertion
- A Compromised Solution: Tell the Truth
- A Reasonable Solution: Create an Abstraction
- Creating Our Own createContext
- Using Our New Hook
- Conclusion
- Chapter 4: Extending DOM Elements and Creating Polymorphic Components
- Mirroring and Extending the Properties of an HTML Element
- Creating Composite Components
- Polymorphic Components
- Conclusion
- Chapter 5: A Guided Tour of the Three Biggest Features in TypeScript 5.0
- Decorators: the Next Generation
- Unleashing const Type Parameters
- Upgraded and Enhanced Enums
- Conclusion
Systemvoraussetzungen
Dateiformat: ePUB
Kopierschutz: Adobe-DRM (Digital Rights Management)
Systemvoraussetzungen:
- Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).
- Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions oder die App PocketBook (siehe E-Book Hilfe).
- E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)
Das Dateiformat ePUB ist sehr gut für Romane und Sachbücher geeignet – also für „fließenden” Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an.
Mit Adobe-DRM wird hier ein „harter” Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.
Bitte beachten Sie: Wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!
Weitere Informationen finden Sie in unserer E-Book Hilfe.