Skip to content

Commit 8e01bef

Browse files
authored
🤖 Merge PR DefinitelyTyped#71555 Makes 'target' prop optional as indicated in docs by @daleyjem
1 parent f3fd093 commit 8e01bef

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

‎types/apicache/apicache-tests.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { middleware, newInstance, options } from "apicache";
1+
import { clear, middleware, newInstance, options } from "apicache";
22

33
let cache = middleware;
44

@@ -11,6 +11,8 @@ options({
1111

1212
options();
1313

14+
clear();
15+
1416
cache = newInstance({
1517
statusCodes: {
1618
exclude: [404, 429, 500],

‎types/apicache/index.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const id: number;
66
/**
77
* clears cache target (key or group), or entire cache if no value passed, returns new index.
88
*/
9-
export function clear(target: string | any[]): any;
9+
export function clear(target?: string | any[]): any;
1010

1111
/** used to create a new ApiCache instance with the same options as the current one */
1212
export function clone(): any;

0 commit comments

Comments
 (0)