@xylabs/storage 5.0.80 → 5.0.81
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/README.md +4 -4
- package/package.json +4 -7
- package/src/KeyValueStore.ts +0 -25
- package/src/index.ts +0 -1
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ A read/write storage device.
|
|
|
55
55
|
### get()
|
|
56
56
|
|
|
57
57
|
```ts
|
|
58
|
-
get(key): Promisable<
|
|
58
|
+
get(key): Promisable<TValue | undefined>;
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
Returns a promise that resolves to the value for the given key.
|
|
@@ -70,7 +70,7 @@ The key to get the value for.
|
|
|
70
70
|
|
|
71
71
|
### Returns
|
|
72
72
|
|
|
73
|
-
`Promisable`\<`
|
|
73
|
+
`Promisable`\<`TValue` \| `undefined`\>
|
|
74
74
|
|
|
75
75
|
### Inherited from
|
|
76
76
|
|
|
@@ -173,7 +173,7 @@ A readonly storage device.
|
|
|
173
173
|
### get()
|
|
174
174
|
|
|
175
175
|
```ts
|
|
176
|
-
get(key): Promisable<
|
|
176
|
+
get(key): Promisable<TValue | undefined>;
|
|
177
177
|
```
|
|
178
178
|
|
|
179
179
|
Returns a promise that resolves to the value for the given key.
|
|
@@ -188,7 +188,7 @@ The key to get the value for.
|
|
|
188
188
|
|
|
189
189
|
### Returns
|
|
190
190
|
|
|
191
|
-
`Promisable`\<`
|
|
191
|
+
`Promisable`\<`TValue` \| `undefined`\>
|
|
192
192
|
|
|
193
193
|
***
|
|
194
194
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/storage",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.81",
|
|
4
4
|
"description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hex",
|
|
@@ -29,27 +29,24 @@
|
|
|
29
29
|
"exports": {
|
|
30
30
|
".": {
|
|
31
31
|
"types": "./dist/neutral/index.d.ts",
|
|
32
|
-
"source": "./src/index.ts",
|
|
33
32
|
"default": "./dist/neutral/index.mjs"
|
|
34
33
|
},
|
|
35
34
|
"./package.json": "./package.json"
|
|
36
35
|
},
|
|
37
36
|
"module": "./dist/neutral/index.mjs",
|
|
38
|
-
"source": "./src/index.ts",
|
|
39
37
|
"types": "./dist/neutral/index.d.ts",
|
|
40
38
|
"files": [
|
|
41
39
|
"dist",
|
|
42
|
-
"src",
|
|
43
40
|
"!**/*.bench.*",
|
|
44
41
|
"!**/*.spec.*",
|
|
45
42
|
"!**/*.test.*"
|
|
46
43
|
],
|
|
47
44
|
"dependencies": {
|
|
48
|
-
"@xylabs/promise": "~5.0.
|
|
45
|
+
"@xylabs/promise": "~5.0.81"
|
|
49
46
|
},
|
|
50
47
|
"devDependencies": {
|
|
51
|
-
"@xylabs/ts-scripts-yarn3": "~7.
|
|
52
|
-
"@xylabs/tsconfig": "~7.
|
|
48
|
+
"@xylabs/ts-scripts-yarn3": "~7.4.11",
|
|
49
|
+
"@xylabs/tsconfig": "~7.4.11",
|
|
53
50
|
"typescript": "~5.9.3"
|
|
54
51
|
},
|
|
55
52
|
"engines": {
|
package/src/KeyValueStore.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { Promisable } from '@xylabs/promise'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* A readonly storage device.
|
|
5
|
-
*/
|
|
6
|
-
export 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
|
-
/**
|
|
19
|
-
* A read/write storage device.
|
|
20
|
-
*/
|
|
21
|
-
export interface KeyValueStore<TValue, TKey = string> extends ReadonlyKeyValueStore<TValue, TKey> {
|
|
22
|
-
clear?(): Promisable<void>
|
|
23
|
-
delete(key: TKey): Promisable<void>
|
|
24
|
-
set(key: TKey, value: TValue): Promisable<void>
|
|
25
|
-
}
|
package/src/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './KeyValueStore.ts'
|