@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.
@@ -1,27 +1,26 @@
1
- import type { Promisable } from '@xylabs/promise';
2
-
3
- /**
4
- * A read/write storage device.
5
- */
6
- export declare interface KeyValueStore<TValue, TKey = string> extends ReadonlyKeyValueStore<TValue, TKey> {
7
- clear?(): Promisable<void>;
8
- delete(key: TKey): Promisable<void>;
9
- set(key: TKey, value: TValue): Promisable<void>;
10
- }
11
-
12
- /**
13
- * A readonly storage device.
14
- */
15
- export declare interface ReadonlyKeyValueStore<TValue, TKey = string> {
16
- /**
17
- * Returns a promise that resolves to the value for the given key.
18
- * @param key The key to get the value for.
19
- */
20
- get(key: TKey): Promisable<TValue | undefined>;
21
- /**
22
- * The keys an array of keys.
23
- */
24
- keys?(): Promisable<TKey[]>;
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.4",
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.4"
42
+ "@xylabs/promise": "^4.13.6"
43
43
  },
44
44
  "devDependencies": {
45
- "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.7",
46
- "@xylabs/tsconfig": "^7.0.0-rc.7",
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": {