TypeScript Method Memoization Decorator

JSON →
library 1.1.1 ·javascript
verified May 27, 2026

typescript-memoize is a decorator library for TypeScript that enables method and getter memoization, primarily for optimizing performance by caching the results of expensive operations. As of version 1.1.1, it provides `@Memoize` for standard caching and `@MemoizeExpiring` for time-limited caching, which automatically invalidates cached values after a specified duration. The library offers flexibility in how memoization keys are generated, supporting methods without parameters, `get` accessors, and methods where memoization is based on specific parameters or custom hash functions. It's a stable library, though release cadence is not explicitly defined, new versions appear infrequently. Its key differentiator lies in its decorator-based approach, integrating seamlessly with TypeScript classes, and allowing for granular control over cache invalidation via custom hash functions or expiration.

total hits 14
actors 4 distinct systems
last hit 3d ago AhrefsBot
GPTBot
5
MetaBot
4
Script
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France