-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
As per documentation, the way to import the MemoryCache class is
import { MemoryCache } from 'memory-cache-node';which doesn't work because MemoryCache is exported as default - as per MemoryCache.d.ts:
export default class MemoryCache<K, V>and the above import statement gives SyntaxError: The requested module 'memory-cache-node' does not provide an export named 'MemoryCache' error.
So the import that actually works is
import MemoryCache from 'memory-cache-node';But then you gotta use it like
const cache = new MemoryCache.MemoryCache<string, number>(30, 50000);otherwise you get TypeError: object is not a constructor.
I'm using es6 modules, if it's relevant.
Metadata
Metadata
Assignees
Labels
No labels