Skip to content

Commit

Permalink
[realm-web] Change return type of 'deserialize()'.
Browse files Browse the repository at this point in the history
  • Loading branch information
elle-j committed Apr 11, 2024
1 parent 7326f87 commit cd99fda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/realm-web/src/utils/ejson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ export function serialize<Obj extends SimpleObject>(obj: Obj): SimpleObject {
* @param obj The object or array of objects in extended-JSON format.
* @returns The object or array of objects with inflated BSON types.
*/
export function deserialize(obj: SimpleObject | SimpleObject[]): EJSON.SerializableTypes {
export function deserialize(
obj: SimpleObject | SimpleObject[],
): unknown /* Return type of 'ReturnType<typeof EJSON.deserialize>' is 'any' */ {
if (Array.isArray(obj)) {
return obj.map((doc) => EJSON.deserialize(doc));
} else {
Expand Down
1 change: 1 addition & 0 deletions packages/realm-web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"typeRoots": [
"./types",
"./node_modules/@types",
"../../node_modules",
"../../node_modules/@types",
],
"types": [
Expand Down

0 comments on commit cd99fda

Please sign in to comment.