@xylabs/storage 4.13.4 → 4.13.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/neutral/index.d.ts +26 -27
- package/package.json +4 -4
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* A
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export { }
|
|
1
|
+
import { Promisable } from '@xylabs/promise';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A readonly storage device.
|
|
5
|
+
*/
|
|
6
|
+
interface ReadonlyKeyValueStore<TValue, TKey = string> {
|
|
7
|
+
/**
|
|
8
|
+
* Returns a promise that resolves to the value for the given key.
|
|
9
|
+
* @param key The key to get the value for.
|
|
10
|
+
*/
|
|
11
|
+
get(key: TKey): Promisable<TValue | undefined>;
|
|
12
|
+
/**
|
|
13
|
+
* The keys an array of keys.
|
|
14
|
+
*/
|
|
15
|
+
keys?(): Promisable<TKey[]>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A read/write storage device.
|
|
19
|
+
*/
|
|
20
|
+
interface KeyValueStore<TValue, TKey = string> extends ReadonlyKeyValueStore<TValue, TKey> {
|
|
21
|
+
clear?(): Promisable<void>;
|
|
22
|
+
delete(key: TKey): Promisable<void>;
|
|
23
|
+
set(key: TKey, value: TValue): Promisable<void>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type { KeyValueStore, ReadonlyKeyValueStore };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/storage",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.6",
|
|
4
4
|
"description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hex",
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"packages/**/*"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@xylabs/promise": "^4.13.
|
|
42
|
+
"@xylabs/promise": "^4.13.6"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.
|
|
46
|
-
"@xylabs/tsconfig": "^7.0.0-rc.
|
|
45
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.8",
|
|
46
|
+
"@xylabs/tsconfig": "^7.0.0-rc.8",
|
|
47
47
|
"typescript": "^5.8.3"
|
|
48
48
|
},
|
|
49
49
|
"engines": {
|