Skip to content

Commit 166228a

Browse files
committed
Use SimpleMerge in DocumentSheetV2's constructor to avoid a RangeError crash reported at microsoft/TypeScript#60927
1 parent 285ac9f commit 166228a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/foundry/client-esm/applications/api/document-sheet.d.mts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { AnyObject, DeepPartial, EmptyObject } from "../../../../utils/index.d.mts";
1+
import type { AnyObject, DeepPartial, EmptyObject, SimpleMerge } from "../../../../utils/index.d.mts";
22
import type ApplicationV2 from "./application.d.mts";
33

44
declare namespace DocumentSheetV2 {
@@ -47,7 +47,8 @@ declare class DocumentSheetV2<
4747
Configuration extends DocumentSheetV2.Configuration<Document> = DocumentSheetV2.Configuration<Document>,
4848
RenderOptions extends DocumentSheetV2.RenderOptions = DocumentSheetV2.RenderOptions,
4949
> extends ApplicationV2<RenderContext, Configuration, RenderOptions> {
50-
constructor(options: DeepPartial<Configuration> & { document: Document });
50+
// Note(LukeAbby): This is a fix for https://github.com/microsoft/TypeScript/issues/60927
51+
constructor(options: SimpleMerge<DeepPartial<Configuration>, { document: Document }>);
5152

5253
// Note(LukeAbby): This `& object` is so that the `DEFAULT_OPTIONS` can be overridden more easily
5354
// Without it then `static override DEFAULT_OPTIONS = { unrelatedProp: 123 }` would error.

0 commit comments

Comments
 (0)