← Back to TypeScript
Generics
A type parameter is not any. The constraint is the promise; inference is usually enough.
Generic Function Basics
beginnerblankCreate a generic function that works with any type.
Generic Constraints
intermediateblankUse generic constraints to limit what types can be used.
Generic Array Utilities
intermediateblankBuild generic utility functions for working with arrays.
Generic Classes
advancedblankCreate a generic Stack class with type-safe push and pop operations.