@liveblocks/client 0.16.15 → 0.17.0-beta1

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.
Files changed (10) hide show
  1. package/index.d.ts +28 -8
  2. package/index.js +1290 -830
  3. package/index.mjs +1091 -782
  4. package/internal.d.ts +418 -248
  5. package/internal.js +313 -168
  6. package/internal.mjs +264 -130
  7. package/package.json +15 -10
  8. package/shared.d.ts +719 -650
  9. package/shared.js +2571 -1331
  10. package/shared.mjs +1992 -1209
package/index.d.ts CHANGED
@@ -1,5 +1,23 @@
1
- import { C as ClientOptions, a as Client } from './shared';
2
- export { B as BroadcastOptions, a as Client, H as History, J as Json, d as JsonObject, c as LiveList, b as LiveMap, L as LiveObject, e as Lson, f as LsonObject, O as Others, P as Presence, R as Room, S as StorageUpdate, U as User } from './shared';
1
+ import { C as ClientOptions, a as Client } from "./shared.js";
2
+ export {
3
+ B as BaseUserMeta,
4
+ d as BroadcastOptions,
5
+ a as Client,
6
+ H as History,
7
+ J as Json,
8
+ e as JsonObject,
9
+ L as LiveList,
10
+ b as LiveMap,
11
+ c as LiveObject,
12
+ f as LiveStructure,
13
+ g as Lson,
14
+ h as LsonObject,
15
+ O as Others,
16
+ P as Presence,
17
+ R as Room,
18
+ S as StorageUpdate,
19
+ U as User,
20
+ } from "./shared.js";
3
21
 
4
22
  /**
5
23
  * Create a client that will be responsible to communicate with liveblocks servers.
@@ -22,7 +40,7 @@ export { B as BroadcastOptions, a as Client, H as History, J as Json, d as JsonO
22
40
  * body: JSON.stringify({ room })
23
41
  * });
24
42
  *
25
- * return await response.json();
43
+ * return await response.json(); // should be: { token: "..." }
26
44
  * }
27
45
  * });
28
46
  */
@@ -34,10 +52,12 @@ declare function createClient(options: ClientOptions): Client;
34
52
  * information, see
35
53
  * https://liveblocks.io/docs/guides/limits#lson-constraint-and-interfaces
36
54
  */
37
- declare type EnsureJson<T> = [
38
- unknown
39
- ] extends [T] ? T : T extends (...args: any[]) => any ? T : {
40
- [K in keyof T]: EnsureJson<T[K]>;
41
- };
55
+ declare type EnsureJson<T> = [unknown] extends [T]
56
+ ? T
57
+ : T extends (...args: unknown[]) => unknown
58
+ ? T
59
+ : {
60
+ [K in keyof T]: EnsureJson<T[K]>;
61
+ };
42
62
 
43
63
  export { EnsureJson, createClient };