Execute oxfmt (#1166)
Ran pnpm oxfmt . This should get the web repo aligned so that we can better enforce oxfmt going forward.
This commit is contained in:
@@ -20,7 +20,11 @@ describe("MultiTabCoordinator broadcast", () => {
|
||||
});
|
||||
a.broadcast({ kind: "messages-changed", deviceId: 1, key: "channel:0" });
|
||||
const event = await received;
|
||||
expect(event).toEqual({ kind: "messages-changed", deviceId: 1, key: "channel:0" });
|
||||
expect(event).toEqual({
|
||||
kind: "messages-changed",
|
||||
deviceId: 1,
|
||||
key: "channel:0",
|
||||
});
|
||||
} finally {
|
||||
a.close();
|
||||
b.close();
|
||||
|
||||
@@ -12,7 +12,10 @@
|
||||
* so the chat slice in another tab can re-query after a write.
|
||||
*/
|
||||
|
||||
export type ChangeKind = "messages-changed" | "nodes-changed" | "telemetry-changed";
|
||||
export type ChangeKind =
|
||||
| "messages-changed"
|
||||
| "nodes-changed"
|
||||
| "telemetry-changed";
|
||||
|
||||
export interface ChangeEvent {
|
||||
kind: ChangeKind;
|
||||
@@ -63,10 +66,14 @@ export class MultiTabCoordinator {
|
||||
if (typeof navigator === "undefined" || !navigator.locks) {
|
||||
return handler();
|
||||
}
|
||||
const result = await navigator.locks.request(resource, options ?? {}, async (lock) => {
|
||||
if (lock === null) return undefined;
|
||||
return handler();
|
||||
});
|
||||
const result = await navigator.locks.request(
|
||||
resource,
|
||||
options ?? {},
|
||||
async (lock) => {
|
||||
if (lock === null) return undefined;
|
||||
return handler();
|
||||
},
|
||||
);
|
||||
return result as T;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user