Skip to content

Add typescript definitions #90

@simoneromano96

Description

@simoneromano96

Prerequisites

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

🚀 Feature Proposal

Add typescript definitions for use in typescript projects

Motivation

I'm currently using fastify-caching in a typescript project, however there are no type definitions so typescript goes in error.
Note that the abstract-cache library suffers from the same issue.

Example

import fastifyCaching from "fastify-caching"
Could not find a declaration file for module 'fastify-caching'. '/[**REDACTED**]/node_modules/fastify-caching/plugin.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/fastify-caching` if it exists or add a new declaration (.d.ts) file containing `declare module 'fastify-caching';`ts(7016)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions