Skip to content

Commit

Permalink
fix: Mark cache.delete & cache.has as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
Alorel committed Dec 13, 2023
1 parent ee4d82b commit 8b05d09
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cache.ts
Expand Up @@ -11,19 +11,21 @@ export interface Cache<K = any, A extends any[] = any[]> {
/**
* Delete a specific cache entry.
* @param key The result of passing the method call args through the associated {@link SerialiserFn serialiser fn}
* @deprecated Use {@link Cache#deleteWithArgs deleteWithArgs()}
*/
delete(key: K): boolean;

/** Like {@link Cache#delete}, but the key gets computed */
/** Like {@link Cache#delete delete()}, but the key gets auto-computed */
deleteWithArgs(...args: A): boolean;

/**
* Check if a specific cache entry exists.
* @param key See {@link Cache#delete delete()}
* @deprecated Use {@link Cache#hasWithArgs hasWithArgs()}
*/
has(key: K): boolean;

/** Like {@link Cache#has}, but the key gets computed */
/** Like {@link Cache#has has()}, but the key gets auto-computed */
hasWithArgs(...args: A): boolean;
}

Expand Down

0 comments on commit 8b05d09

Please sign in to comment.