Skip to content

cache::get returns void in typescript #132

@juancarlovieri

Description

@juancarlovieri

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

4.23.2

Plugin version

8.3.0

Node.js version

18.0.0

Operating system

Linux

Operating system version (i.e. 20.04, 11.3, 10)

22.04

Description

When using local cache (e.g. fastify.cache.set and fastify.cache.get), fastify.cache.get returns void by typescript definition.

Steps to Reproduce

Use typescript and run const res = await fastify.cache.get('something')

res is void according to typescript and will result in compile error.

Expected Behavior

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions