-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
42 lines (38 loc) · 1.01 KB
/
types.ts
File metadata and controls
42 lines (38 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* @fileoverview Public type surface for `cacache/*` modules — the
* `CacheEntry` row shape returned by reads and the option bags
* consumed by `clear` / `get` / `put`. Pure types, no runtime side
* effects.
*/
export interface GetOptions {
integrity?: string | undefined
size?: number | undefined
memoize?: boolean | undefined
}
export interface PutOptions {
integrity?: string | undefined
size?: number | undefined
metadata?: unknown | undefined
memoize?: boolean | undefined
}
export interface CacheEntry {
data: Buffer
integrity: string
key: string
metadata?: unknown | undefined
path: string
size: number
time: number
}
export interface RemoveOptions {
/**
* Optional key prefix to filter removals.
* If provided, only keys starting with this prefix will be removed.
* Can include wildcards (*) for pattern matching.
*
* @example
* { prefix: 'socket-sdk' } // Simple prefix
* { prefix: 'socket-sdk:scans:abc*' } // With wildcard
*/
prefix?: string | undefined
}