My Account Log in

5 options

Unleashing the Power of TypeScript / Kinney Steve.

EBSCOhost Academic eBook Collection (North America) Available online

View online

EBSCOhost Ebook Public Library Collection - North America Available online

View online

EBSCOhost eBook Community College Collection Available online

View online

Ebook Central Academic Complete Available online

View online

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Steve, Kinney, author.
Language:
English
Subjects (All):
TypeScript (Computer program language).
Web applications.
Physical Description:
1 online resource (59 pages)
Place of Publication:
Cremorne, VIC : SitePoint Pty. Ltd., [2023]
Summary:
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.
Contents:
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
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
Chapter 4: Extending DOM Elements and Creating Polymorphic Components
Mirroring and Extending the Properties of an HTML Element
Creating Composite Components
Polymorphic Components
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.
Notes:
Description based upon print version of record.
Description based on print version record.
ISBN:
9781925836585
1925836584
OCLC:
1405942173

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account