strapi-plugin-redis icon indicating copy to clipboard operation
strapi-plugin-redis copied to clipboard

TypeScript error when using strapi.redis

Open Deer404 opened this issue 1 year ago • 1 comments

Description: I am using strapi.redis in my Strapi project with TypeScript, but I am getting a TypeScript error that says "Property redis does not exist on type strapi".

Steps to reproduce:

  1. Install strapi-plugin-redis package
  2. set config and use strapi.redis

Expected behavior: TypeScript should recognize the redis property on strapi and not throw an error.

Actual behavior: TypeScript is throwing an error that says "Property redis does not exist on type strapi".

Environment:

Strapi version: 4.10.5 Node.js version: 18.16 NPM/Yarn version: 9.5.1 Operating system: debian 10

Deer404 avatar Jun 19 '23 06:06 Deer404

I don't currently know typescript nor do I plan on writing types for this package, if someone wants to open a PR I can review and merge it but for now I don't use TS

derrickmehaffy avatar Jul 03 '23 20:07 derrickmehaffy