redis-typed-keys is a TypeScript library (v0.2.1, pre-1.0, irregular releases) that provides a type-safe wrapper around Redis commands, enforcing key naming conventions (prefixes, separators) and typed data structures (hashes, sets, sorted sets). Unlike raw redis or ioredis, it prevents runtime mistakes by ensuring keys follow defined patterns and values are serialized/deserialized correctly. It ships its own types but depends on a Redis client (e.g., ioredis).
npm install redis-typed-keysNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows typed Redis hash operations: set and get a user record using schema-defined key prefixes and field types.
Update schema initialization: replace `keys` with `schemas` and adjust structure.
Use `client.client` instead of `client.getClient()`.
Ensure all used key names are added to the schema before operations.
Enable `strict` in tsconfig.json to enforce schema types.
Add the missing schema definition or correct the key name.
Use client.client directly (the underlying Redis connection).
Check that Redis is running locally or set REDIS_HOST environment variable.