function adaptRedisModule
Since 0.2.0
adaptRedisModule(module: unknown): IRedisModule

Narrows an ioredis module to the constructor facade this package uses.

Pure and synchronous, so the transport's construction path is unit-testable with a fake module and never needs the real driver installed.

Parameters

module: unknown

The module to adapt, typically import('npm:ioredis@5.x')

Return Type

A facade whose create builds a client

Throws

RedisModuleError

When the module exposes no constructor

Usage

import { adaptRedisModule } from "realtime-backplane-plugin/src/index.ts";