Skip to content

Commit 063fe55

Browse files
authored
feat: modify cache type to allow generic usage (#2947)
1 parent 5f708b7 commit 063fe55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/_internal/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,8 @@ export type RevalidateCallback = <K extends RevalidateEvent>(
518518

519519
export interface Cache<Data = any> {
520520
keys(): IterableIterator<string>
521-
get(key: string): State<Data> | undefined
522-
set(key: string, value: State<Data>): void
521+
get<T = Data>(key: string): State<T> | undefined
522+
set<T = Data>(key: string, value: State<T>): void
523523
delete(key: string): void
524524
}
525525

0 commit comments

Comments
 (0)