Skip to content

TS error when using QuickLRU from readme example #51

@maslowivan

Description

@maslowivan
export const cacheable = new CacheableLookup({
  cache: new QuickLRU({ maxSize: 1000 }),
});
Type 'QuickLRU<string, EntryObject[] | Promise<EntryObject[] | undefined>>' is not assignable to type 'CacheInstance'.
  Types of property 'set' are incompatible.
    Type '(key: string, value: EntryObject[] | Promise<EntryObject[] | undefined>, options?: { maxAge?: number | undefined; } | undefined) => QuickLRU<string, EntryObject[] | Promise<...>>' is not assignable to type '(hostname: string, entries: EntryObject[], ttl: number) => TPromise<boolean | void | CacheInstance>'.
      Types of parameters 'options' and 'ttl' are incompatible.
        Type 'number' is not assignable to type '{ maxAge?: number | undefined; } | undefined'.ts(2322)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions