@kokimoki/app 1.15.1 → 1.15.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/kokimoki-client.d.ts +4 -3
- package/dist/kokimoki.min.d.ts +4 -3
- package/dist/kokimoki.min.js +1 -1
- package/dist/kokimoki.min.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/fields.d.ts +0 -95
- package/dist/fields.js +0 -152
- package/dist/kokimoki-client-refactored.d.ts +0 -68
- package/dist/kokimoki-client-refactored.js +0 -394
- package/dist/kokimoki-schema.d.ts +0 -84
- package/dist/kokimoki-schema.js +0 -163
- package/dist/message-queue.d.ts +0 -8
- package/dist/message-queue.js +0 -19
- package/dist/synced-schema.d.ts +0 -59
- package/dist/synced-schema.js +0 -84
- package/dist/synced-store.d.ts +0 -7
- package/dist/synced-store.js +0 -9
- package/dist/synced-types.d.ts +0 -38
- package/dist/synced-types.js +0 -68
- package/dist/ws-message-type copy.d.ts +0 -6
- package/dist/ws-message-type copy.js +0 -7
|
@@ -5,6 +5,7 @@ import type { Paginated } from "./types/common";
|
|
|
5
5
|
import { KokimokiStore } from "./kokimoki-store";
|
|
6
6
|
import { KokimokiAwareness } from "./kokimoki-awareness";
|
|
7
7
|
import { KokimokiLocalStore } from "./kokimoki-local-store";
|
|
8
|
+
type StoreValue<S> = S extends KokimokiStore<infer U> ? U : never;
|
|
8
9
|
declare const KokimokiClient_base: new () => TypedEmitter<KokimokiClientEvents>;
|
|
9
10
|
export declare class KokimokiClient<ClientContextT = any> extends KokimokiClient_base {
|
|
10
11
|
readonly host: string;
|
|
@@ -72,9 +73,9 @@ export declare class KokimokiClient<ClientContextT = any> extends KokimokiClient
|
|
|
72
73
|
private sendUnsubscribeReq;
|
|
73
74
|
join<T>(store: KokimokiStore<T>): Promise<void>;
|
|
74
75
|
leave<T>(store: KokimokiStore<T>): Promise<void>;
|
|
75
|
-
transact<
|
|
76
|
-
[K in keyof
|
|
77
|
-
}
|
|
76
|
+
transact<TStores extends readonly KokimokiStore<any>[], ReturnT = void>(stores: [...TStores], handler: (proxies: {
|
|
77
|
+
[K in keyof TStores]: StoreValue<TStores[K]>;
|
|
78
|
+
}) => ReturnT | Promise<ReturnT>): Promise<ReturnT>;
|
|
78
79
|
close(): Promise<void>;
|
|
79
80
|
getRoomHash<T>(store: KokimokiStore<T>): number;
|
|
80
81
|
/** Initializers */
|
package/dist/kokimoki.min.d.ts
CHANGED
|
@@ -76,6 +76,7 @@ declare class KokimokiLocalStore<T> extends KokimokiStore<T> {
|
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
type StoreValue<S> = S extends KokimokiStore<infer U> ? U : never;
|
|
79
80
|
declare const KokimokiClient_base: new () => TypedEmitter<KokimokiClientEvents>;
|
|
80
81
|
declare class KokimokiClient<ClientContextT = any> extends KokimokiClient_base {
|
|
81
82
|
readonly host: string;
|
|
@@ -143,9 +144,9 @@ declare class KokimokiClient<ClientContextT = any> extends KokimokiClient_base {
|
|
|
143
144
|
private sendUnsubscribeReq;
|
|
144
145
|
join<T>(store: KokimokiStore<T>): Promise<void>;
|
|
145
146
|
leave<T>(store: KokimokiStore<T>): Promise<void>;
|
|
146
|
-
transact<
|
|
147
|
-
[K in keyof
|
|
148
|
-
}
|
|
147
|
+
transact<TStores extends readonly KokimokiStore<any>[], ReturnT = void>(stores: [...TStores], handler: (proxies: {
|
|
148
|
+
[K in keyof TStores]: StoreValue<TStores[K]>;
|
|
149
|
+
}) => ReturnT | Promise<ReturnT>): Promise<ReturnT>;
|
|
149
150
|
close(): Promise<void>;
|
|
150
151
|
getRoomHash<T>(store: KokimokiStore<T>): number;
|
|
151
152
|
/** Initializers */
|
package/dist/kokimoki.min.js
CHANGED
|
@@ -486,7 +486,7 @@ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
|
|
|
486
486
|
var eventsExports = events.exports;
|
|
487
487
|
var EventEmitter$1 = /*@__PURE__*/getDefaultExportFromCjs(eventsExports);
|
|
488
488
|
|
|
489
|
-
const KOKIMOKI_APP_VERSION = "1.15.
|
|
489
|
+
const KOKIMOKI_APP_VERSION = "1.15.2";
|
|
490
490
|
|
|
491
491
|
/**
|
|
492
492
|
* Utility module to work with key-value stores.
|