I'm trying to connect Redis (redislab) with Node application using handy-redis npm.
import { createNodeRedisClient } from 'handy-redis';
(async function() {
const client = createNodeRedisClient({
host: 'redis-<link>.ap-south-1-1.ec2.cloud.redislabs.com',
port: <port>,
password: <password>,
});
})();
But Typescript returning this error:
Argument of type '{ host: string; port: string; password: string; }' is not
assignable to parameter of type 'RedisClient'.
Object literal may only specify known properties, and 'host' does not exist in type
'RedisClient'
Though Typescript returning error, but the app properly working.
I've tried for long time to solve this, but couldn't success.
Please any one suggest me, how to properly use handy-redis with redislab to get rid of from this error.