@liveblocks/client 0.18.3 → 0.18.4

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/index.d.ts DELETED
@@ -1,54 +0,0 @@
1
- import { C as ClientOptions, a as Client } from './index-2601cea5.js';
2
- export { B as BaseUserMeta, d as BroadcastOptions, a as Client, H as History, I as Immutable, J as Json, e as JsonObject, L as LiveList, b as LiveMap, c as LiveObject, f as LiveStructure, g as Lson, h as LsonObject, O as Others, R as Room, S as StorageUpdate, U as User } from './index-2601cea5.js';
3
-
4
- /**
5
- * Create a client that will be responsible to communicate with liveblocks servers.
6
- *
7
- * @example
8
- * const client = createClient({
9
- * authEndpoint: "/api/auth"
10
- * });
11
- *
12
- * // It's also possible to use a function to call your authentication endpoint.
13
- * // Useful to add additional headers or use an API wrapper (like Firebase functions)
14
- * const client = createClient({
15
- * authEndpoint: async (room) => {
16
- * const response = await fetch("/api/auth", {
17
- * method: "POST",
18
- * headers: {
19
- * Authentication: "token",
20
- * "Content-Type": "application/json"
21
- * },
22
- * body: JSON.stringify({ room })
23
- * });
24
- *
25
- * return await response.json(); // should be: { token: "..." }
26
- * }
27
- * });
28
- */
29
- declare function createClient(options: ClientOptions): Client;
30
-
31
- /**
32
- * Shallowly compares two given values.
33
- *
34
- * - Two simple values are considered equal if they're strictly equal
35
- * - Two arrays are considered equal if their members are strictly equal
36
- * - Two objects are considered equal if their values are strictly equal
37
- *
38
- * Testing goes one level deep.
39
- */
40
- declare function shallow(a: unknown, b: unknown): boolean;
41
-
42
- /**
43
- * Helper type to help users adopt to Lson types from interface definitions.
44
- * You should only use this to wrap interfaces you don't control. For more
45
- * information, see
46
- * https://liveblocks.io/docs/guides/limits#lson-constraint-and-interfaces
47
- */
48
- declare type EnsureJson<T> = [
49
- unknown
50
- ] extends [T] ? T : T extends (...args: unknown[]) => unknown ? T : {
51
- [K in keyof T]: EnsureJson<T[K]>;
52
- };
53
-
54
- export { EnsureJson, createClient, shallow };