From 99ecdbaf957af871ca32923a99725386a535a481 Mon Sep 17 00:00:00 2001 From: aramissennyeydd Date: Mon, 29 Sep 2025 10:25:38 -0400 Subject: [PATCH] overzealous comment Signed-off-by: aramissennyeydd --- packages/backend-app-api/src/wiring/helpers.ts | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/packages/backend-app-api/src/wiring/helpers.ts b/packages/backend-app-api/src/wiring/helpers.ts index e67c9a1125..1be7f62da2 100644 --- a/packages/backend-app-api/src/wiring/helpers.ts +++ b/packages/backend-app-api/src/wiring/helpers.ts @@ -42,18 +42,11 @@ export type DeepReadonly = { /** * Deeply freezes an object by recursively freezing all of its properties. - * - * - https://gist.github.com/tkrotoff/e997cd6ff8d6cf6e51e6bb6146407fc3 - * - https://stackoverflow.com/a/69656011 - * - * FIXME Should be part of Lodash and related: https://github.com/Maggi64/moderndash/issues/139 - * - * Does not work with Set and Map: https://stackoverflow.com/q/31509175 + * From https://gist.github.com/tkrotoff/e997cd6ff8d6cf6e51e6bb6146407fc3 + + * https://stackoverflow.com/a/69656011 */ -export function deepFreeze< - T, +export function deepFreeze(obj: T) { // Can cause: "Type instantiation is excessively deep and possibly infinite." ->(obj: T) { // @ts-expect-error Object.values(obj).forEach( value => Object.isFrozen(value) || deepFreeze(value),