Noymul Islam Chowdhury
Noymul Islam Chowdhury

Reputation: 141

How to use type/redis with redis?

Hi I am new at typescript and doing some demo projects using NestJs. I want to integrate redis. I was looking for some typescript friendly packages and found @type/redis here. But all it says is its a type definition of redis github. But I am not understanding how to use them together. Any suggestion will be highly appreciated.

Upvotes: 0

Views: 908

Answers (1)

ahz
ahz

Reputation: 950

Just install both packages: npm install redis @types/redis and use it in your project: import redis = require('redis'). Types hints should appear in TypeScript enabled editor.

Upvotes: 1

Related Questions