@liveblocks/core 1.10.4 → 1.11.0
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/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1349,7 +1349,7 @@ declare type OthersEvent<TPresence extends JsonObject, TUserMeta extends BaseUse
|
|
|
1349
1349
|
}>;
|
|
1350
1350
|
|
|
1351
1351
|
declare type PartialNullable<T> = {
|
|
1352
|
-
[P in keyof T]?: T[P] | null
|
|
1352
|
+
[P in keyof T]?: T[P] | null;
|
|
1353
1353
|
};
|
|
1354
1354
|
|
|
1355
1355
|
declare type RoomThreadsNotificationSettings = "all" | "replies_and_mentions" | "none";
|
package/dist/index.d.ts
CHANGED
|
@@ -1349,7 +1349,7 @@ declare type OthersEvent<TPresence extends JsonObject, TUserMeta extends BaseUse
|
|
|
1349
1349
|
}>;
|
|
1350
1350
|
|
|
1351
1351
|
declare type PartialNullable<T> = {
|
|
1352
|
-
[P in keyof T]?: T[P] | null
|
|
1352
|
+
[P in keyof T]?: T[P] | null;
|
|
1353
1353
|
};
|
|
1354
1354
|
|
|
1355
1355
|
declare type RoomThreadsNotificationSettings = "all" | "replies_and_mentions" | "none";
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ var __export = (target, all) => {
|
|
|
6
6
|
|
|
7
7
|
// src/version.ts
|
|
8
8
|
var PKG_NAME = "@liveblocks/core";
|
|
9
|
-
var PKG_VERSION = "1.
|
|
9
|
+
var PKG_VERSION = "1.11.0";
|
|
10
10
|
var PKG_FORMAT = "cjs";
|
|
11
11
|
|
|
12
12
|
// src/dupe-detection.ts
|
|
@@ -1834,20 +1834,18 @@ var Batch = class {
|
|
|
1834
1834
|
this.error = false;
|
|
1835
1835
|
calls.forEach((call, index) => {
|
|
1836
1836
|
const result = _optionalChain([results, 'optionalAccess', _46 => _46[index]]);
|
|
1837
|
-
if (
|
|
1837
|
+
if (!Array.isArray(results)) {
|
|
1838
|
+
call.reject(new Error("Callback must return an array."));
|
|
1839
|
+
} else if (calls.length !== results.length) {
|
|
1840
|
+
call.reject(
|
|
1841
|
+
new Error(
|
|
1842
|
+
`Callback must return an array of the same length as the number of provided items. Expected ${calls.length}, but got ${results.length}.`
|
|
1843
|
+
)
|
|
1844
|
+
);
|
|
1845
|
+
} else if (result instanceof Error) {
|
|
1838
1846
|
call.reject(result);
|
|
1839
|
-
} else if (result !== void 0) {
|
|
1840
|
-
call.resolve(result);
|
|
1841
1847
|
} else {
|
|
1842
|
-
|
|
1843
|
-
call.reject(
|
|
1844
|
-
new Error(
|
|
1845
|
-
`Batch callback must return an array of the same length as the number of calls in the batch. Expected ${calls.length}, but got ${results.length}.`
|
|
1846
|
-
)
|
|
1847
|
-
);
|
|
1848
|
-
} else {
|
|
1849
|
-
call.reject(new Error("Batch callback must return an array."));
|
|
1850
|
-
}
|
|
1848
|
+
call.resolve(result);
|
|
1851
1849
|
}
|
|
1852
1850
|
});
|
|
1853
1851
|
} catch (error3) {
|