ilovepixelart/ts-cache-mongoose

Fix a typo in the doc

monolithed opened this issue · 2 comments

 // TS2632: Cannot assign to cache  because it is an import.
import cache from 'ts-cache-mongoose';

 // TS2448: Block-scoped variable  cache used before its declaration.
const cache = cache.init(mongoose, {
  defaultTTL: '60 seconds',
  engine: 'memory',
})

Is this a typo, or am I not understanding the essence of such magic?

Yes it's a typo )

const cache = <--- this can be removed or renamed to something else

Fixed here: dad993d