Skip to content

Commit

Permalink
improve set/get types (#48)
Browse files Browse the repository at this point in the history
Co-authored-by: denys-bondarenko <[email protected]>
  • Loading branch information
denbon05 and denys-bondarenko authored Oct 10, 2024
1 parent c41deb4 commit b70e266
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
4 changes: 2 additions & 2 deletions lib/types/Storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ export interface IStorage {
/**
* Get cached data
*/
get(key: string): any;
get<T>(key: string): T;

/**
* Set data to cache
*/
set(key: string, value: any): void;
set<T>(key: string, value: T): void;

/**
* Check if data exists in cache
Expand Down
16 changes: 6 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fastify-lcache",
"version": "2.1.1",
"version": "2.1.2",
"description": "Light cache plugin for fastify",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit b70e266

Please sign in to comment.