From 10adf6658b82d8a35804b8e07b3b3549d954d8a0 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Mon, 28 Sep 2026 17:27:04 +0200 Subject: [PATCH] Let layoutShallowEquals compare any layout-shaped object --- src/state/layout-types.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/state/layout-types.ts b/src/state/layout-types.ts index 2d526617b..fd9b36a69 100644 --- a/src/state/layout-types.ts +++ b/src/state/layout-types.ts @@ -150,10 +150,11 @@ export type Layout = | PipLayout; /** - * Tests whether the top-level properties and array elements of layout `a` are - * equal to those of layout `b`. Useful for deduping redundant layout updates. + * Tests whether the top-level properties and array elements of `a` are equal + * to those of `b`. Useful for deduping redundant layout and layout media + * updates. */ -export function layoutShallowEquals(a: Layout, b: Layout): boolean { +export function layoutShallowEquals(a: T, b: T): boolean { // If a and b have the same number of keys and every key in a is also in b, // then they have the same keys. const aKeys = Object.keys(a);