@esmalley/ts-utils 6.4.1 → 6.4.2
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/cjs/index.js +6 -6
- package/dist/cjs/index.js.map +2 -2
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +2 -2
- package/dist/types/Store.d.ts +11 -10
- package/dist/types/Store.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/types/Store.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { Kontororu } from './Kontororu.js';
|
|
2
|
-
type StoreData =
|
|
3
|
-
|
|
4
|
-
[id: string]: Record<string, unknown>;
|
|
5
|
-
};
|
|
6
|
-
};
|
|
7
|
-
export declare class Store extends Kontororu {
|
|
2
|
+
export type StoreData = Record<string, Record<string, unknown>>;
|
|
3
|
+
export declare class Store<TStore extends StoreData = StoreData> extends Kontororu {
|
|
8
4
|
private store;
|
|
9
5
|
/**
|
|
10
6
|
* Load an object into the store
|
|
11
7
|
*/
|
|
12
|
-
load(data:
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
load(data: TStore): void;
|
|
9
|
+
/**
|
|
10
|
+
* Get the first result
|
|
11
|
+
*/
|
|
12
|
+
get<K extends keyof TStore>(table: K, args?: Record<string, unknown>): TStore[K][string] | null;
|
|
13
|
+
/**
|
|
14
|
+
* Read the results
|
|
15
|
+
*/
|
|
16
|
+
read<K extends keyof TStore>(table: K, args?: Record<string, unknown>): Record<string, TStore[K][string]>;
|
|
15
17
|
}
|
|
16
|
-
export {};
|
|
17
18
|
//# sourceMappingURL=Store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Store.d.ts","sourceRoot":"","sources":["../../src/Store.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Store.d.ts","sourceRoot":"","sources":["../../src/Store.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAI3C,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAEhE,qBAAa,KAAK,CAAC,MAAM,SAAS,SAAS,GAAG,SAAS,CAAE,SAAQ,SAAS;IACxE,OAAO,CAAC,KAAK,CAAwB;IAErC;;OAEG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM;IAIjB;;OAEG;IACH,GAAG,CAAC,CAAC,SAAS,MAAM,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI;IAMnG;;OAEG;IACH,IAAI,CAAC,CAAC,SAAS,MAAM,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;CA0D9G"}
|