From 166228a2a58680b50640de15c3f4733d4eb9e44c Mon Sep 17 00:00:00 2001 From: Luke Abby Date: Wed, 8 Jan 2025 19:05:45 -0800 Subject: [PATCH] Use SimpleMerge in DocumentSheetV2's constructor to avoid a RangeError crash reported at https://github.com/microsoft/TypeScript/issues/60927 --- src/foundry/client-esm/applications/api/document-sheet.d.mts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/foundry/client-esm/applications/api/document-sheet.d.mts b/src/foundry/client-esm/applications/api/document-sheet.d.mts index 6051b41f7..e90f18566 100644 --- a/src/foundry/client-esm/applications/api/document-sheet.d.mts +++ b/src/foundry/client-esm/applications/api/document-sheet.d.mts @@ -1,4 +1,4 @@ -import type { AnyObject, DeepPartial, EmptyObject } from "../../../../utils/index.d.mts"; +import type { AnyObject, DeepPartial, EmptyObject, SimpleMerge } from "../../../../utils/index.d.mts"; import type ApplicationV2 from "./application.d.mts"; declare namespace DocumentSheetV2 { @@ -47,7 +47,8 @@ declare class DocumentSheetV2< Configuration extends DocumentSheetV2.Configuration = DocumentSheetV2.Configuration, RenderOptions extends DocumentSheetV2.RenderOptions = DocumentSheetV2.RenderOptions, > extends ApplicationV2 { - constructor(options: DeepPartial & { document: Document }); + // Note(LukeAbby): This is a fix for https://github.com/microsoft/TypeScript/issues/60927 + constructor(options: SimpleMerge, { document: Document }>); // Note(LukeAbby): This `& object` is so that the `DEFAULT_OPTIONS` can be overridden more easily // Without it then `static override DEFAULT_OPTIONS = { unrelatedProp: 123 }` would error.