@liveblocks/client
Advanced tools
Comparing version 0.10.0 to 0.11.0
@@ -98,3 +98,3 @@ import { RecordData, List } from "."; | ||
getConnectionState: () => "failed" | "closed" | "open" | "connecting" | "authenticating" | "unavailable"; | ||
getCurrentUser: <TPresence extends Serializable = Serializable>() => User<TPresence> | null; | ||
getSelf: <TPresence extends Serializable = Serializable>() => User<TPresence> | null; | ||
getPresence: <T_14 extends Serializable>() => T_14; | ||
@@ -101,0 +101,0 @@ getOthers: <T_15 extends Serializable>() => Others<T_15>; |
@@ -126,3 +126,3 @@ "use strict"; | ||
} | ||
function getCurrentUser() { | ||
function getSelf() { | ||
return state.connection.state === "open" || | ||
@@ -594,3 +594,3 @@ state.connection.state === "connecting" | ||
getConnectionState, | ||
getCurrentUser, | ||
getSelf, | ||
// Presence | ||
@@ -658,3 +658,3 @@ getPresence, | ||
getConnectionState: machine.selectors.getConnectionState, | ||
getCurrentUser: machine.selectors.getCurrentUser, | ||
getSelf: machine.selectors.getSelf, | ||
subscribe: machine.subscribe, | ||
@@ -661,0 +661,0 @@ unsubscribe: machine.unsubscribe, |
@@ -147,3 +147,3 @@ import { RecordData, Record, List } from "./doc"; | ||
* | ||
* @param listener - the callback that is called everytime the current user presence is updated with {@link Room.updatePresence}. | ||
* @param listener - the callback that is called every time the current user presence is updated with {@link Room.updatePresence}. | ||
* | ||
@@ -246,9 +246,10 @@ * ### Example | ||
* Gets the current user. | ||
* Returns null if not it is not yet connected to the room. | ||
* | ||
* ### Example | ||
* ``` typescript | ||
* const user = room.getCurrentUser(); | ||
* const user = room.getSelf(); | ||
* ``` | ||
*/ | ||
getCurrentUser<TPresence extends Presence = Presence>(): User<TPresence> | null; | ||
getSelf<TPresence extends Presence = Presence>(): User<TPresence> | null; | ||
/** | ||
@@ -255,0 +256,0 @@ * Gets the presence of the current user. |
@@ -98,3 +98,3 @@ import { RecordData, List } from "."; | ||
getConnectionState: () => "failed" | "closed" | "open" | "connecting" | "authenticating" | "unavailable"; | ||
getCurrentUser: <TPresence extends Serializable = Serializable>() => User<TPresence> | null; | ||
getSelf: <TPresence extends Serializable = Serializable>() => User<TPresence> | null; | ||
getPresence: <T_14 extends Serializable>() => T_14; | ||
@@ -101,0 +101,0 @@ getOthers: <T_15 extends Serializable>() => Others<T_15>; |
@@ -104,3 +104,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
} | ||
function getCurrentUser() { | ||
function getSelf() { | ||
return state.connection.state === "open" || | ||
@@ -572,3 +572,3 @@ state.connection.state === "connecting" | ||
getConnectionState, | ||
getCurrentUser, | ||
getSelf, | ||
// Presence | ||
@@ -634,3 +634,3 @@ getPresence, | ||
getConnectionState: machine.selectors.getConnectionState, | ||
getCurrentUser: machine.selectors.getCurrentUser, | ||
getSelf: machine.selectors.getSelf, | ||
subscribe: machine.subscribe, | ||
@@ -637,0 +637,0 @@ unsubscribe: machine.unsubscribe, |
@@ -147,3 +147,3 @@ import { RecordData, Record, List } from "./doc"; | ||
* | ||
* @param listener - the callback that is called everytime the current user presence is updated with {@link Room.updatePresence}. | ||
* @param listener - the callback that is called every time the current user presence is updated with {@link Room.updatePresence}. | ||
* | ||
@@ -246,9 +246,10 @@ * ### Example | ||
* Gets the current user. | ||
* Returns null if not it is not yet connected to the room. | ||
* | ||
* ### Example | ||
* ``` typescript | ||
* const user = room.getCurrentUser(); | ||
* const user = room.getSelf(); | ||
* ``` | ||
*/ | ||
getCurrentUser<TPresence extends Presence = Presence>(): User<TPresence> | null; | ||
getSelf<TPresence extends Presence = Presence>(): User<TPresence> | null; | ||
/** | ||
@@ -255,0 +256,0 @@ * Gets the presence of the current user. |
{ | ||
"name": "@liveblocks/client", | ||
"version": "0.10.0", | ||
"version": "0.11.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./lib/cjs/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
223895
4253