@xylabs/storage 4.4.33 → 4.4.34

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.
@@ -2,7 +2,7 @@ import type { Promisable } from '@xylabs/promise';
2
2
  /**
3
3
  * A readonly storage device.
4
4
  */
5
- export interface ReadonlyKeyValueStore<TValue, TKey extends string = string> {
5
+ export interface ReadonlyKeyValueStore<TValue, TKey = string> {
6
6
  /**
7
7
  * Returns a promise that resolves to the value for the given key.
8
8
  * @param key The key to get the value for.
@@ -16,9 +16,9 @@ export interface ReadonlyKeyValueStore<TValue, TKey extends string = string> {
16
16
  /**
17
17
  * A read/write storage device.
18
18
  */
19
- export interface KeyValueStore<TValue, TKey extends string = string> extends ReadonlyKeyValueStore<TValue, TKey> {
19
+ export interface KeyValueStore<TValue, TKey = string> extends ReadonlyKeyValueStore<TValue, TKey> {
20
20
  clear?(): Promisable<void>;
21
21
  delete(key: TKey): Promisable<void>;
22
- set(key: TKey, value: TValue): Promisable<void>;
22
+ set(key: TKey, value: TValue): Promisable<TKey>;
23
23
  }
24
24
  //# sourceMappingURL=KeyValueStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"KeyValueStore.d.ts","sourceRoot":"","sources":["../../src/KeyValueStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD;;GAEG;AACH,MAAM,WAAW,qBAAqB,CAAC,MAAM,EAAE,IAAI,SAAS,MAAM,GAAG,MAAM;IACzE;;;OAGG;IACH,GAAG,CAAC,GAAG,EAAE,IAAI,GAAG,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC9C;;OAEG;IACH,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,EAAE,CAAC,CAAA;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa,CAAC,MAAM,EAAE,IAAI,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,qBAAqB,CAAC,MAAM,EAAE,IAAI,CAAC;IAC9G,KAAK,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAA;IAC1B,MAAM,CAAC,GAAG,EAAE,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,CAAA;IACnC,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,CAAA;CAChD"}
1
+ {"version":3,"file":"KeyValueStore.d.ts","sourceRoot":"","sources":["../../src/KeyValueStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD;;GAEG;AACH,MAAM,WAAW,qBAAqB,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM;IAC1D;;;OAGG;IACH,GAAG,CAAC,GAAG,EAAE,IAAI,GAAG,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC9C;;OAEG;IACH,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,EAAE,CAAC,CAAA;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM,CAAE,SAAQ,qBAAqB,CAAC,MAAM,EAAE,IAAI,CAAC;IAC/F,KAAK,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAA;IAC1B,MAAM,CAAC,GAAG,EAAE,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,CAAA;IACnC,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,CAAA;CAChD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/storage",
3
- "version": "4.4.33",
3
+ "version": "4.4.34",
4
4
  "description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
5
5
  "keywords": [
6
6
  "hex",
@@ -39,12 +39,12 @@
39
39
  "packages/**/*"
40
40
  ],
41
41
  "dependencies": {
42
- "@xylabs/promise": "^4.4.33"
42
+ "@xylabs/promise": "^4.4.34"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@xylabs/ts-scripts-yarn3": "^4.2.6",
46
46
  "@xylabs/tsconfig": "^4.2.6",
47
- "@xylabs/vitest-extended": "^4.4.33",
47
+ "@xylabs/vitest-extended": "^4.4.34",
48
48
  "typescript": "^5.7.2",
49
49
  "vitest": "^2.1.8"
50
50
  },
@@ -3,7 +3,7 @@ import type { Promisable } from '@xylabs/promise'
3
3
  /**
4
4
  * A readonly storage device.
5
5
  */
6
- export interface ReadonlyKeyValueStore<TValue, TKey extends string = string> {
6
+ export interface ReadonlyKeyValueStore<TValue, TKey = string> {
7
7
  /**
8
8
  * Returns a promise that resolves to the value for the given key.
9
9
  * @param key The key to get the value for.
@@ -18,8 +18,8 @@ export interface ReadonlyKeyValueStore<TValue, TKey extends string = string> {
18
18
  /**
19
19
  * A read/write storage device.
20
20
  */
21
- export interface KeyValueStore<TValue, TKey extends string = string> extends ReadonlyKeyValueStore<TValue, TKey> {
21
+ export interface KeyValueStore<TValue, TKey = string> extends ReadonlyKeyValueStore<TValue, TKey> {
22
22
  clear?(): Promisable<void>
23
23
  delete(key: TKey): Promisable<void>
24
- set(key: TKey, value: TValue): Promisable<void>
24
+ set(key: TKey, value: TValue): Promisable<TKey>
25
25
  }