You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: improve typing by adding generics to setItem methods
- Add generic type parameter `<T>` to setItem methods in all interfaces
allowing type-safe content storage: `setItem<T>(key, content: T | undefined)`
- Update AbstractBaseStrategy and ExpirationStrategy with generic setItem
- Update all storage implementations with generic setItem methods
- Narrow intermediate deserialization types in Redis storages from `unknown`
to more specific union types (e.g., `string | T` during JSON parsing)
- Fix test to use explicit union type for mixed content arrays
This improves type inference and allows consumers to get compile-time
type checking when storing typed data in the cache.
0 commit comments