@league-of-foundry-developers/foundry-vtt-types 13.346.0-beta.20250710155653 → 13.346.0-beta.20250711091515

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/package.json +1 -1
  2. package/src/foundry/client/applications/api/application.d.mts +23 -11
  3. package/src/foundry/client/applications/api/category-browser.d.mts +11 -2
  4. package/src/foundry/client/applications/api/dialog.d.mts +6 -2
  5. package/src/foundry/client/applications/api/document-sheet.d.mts +16 -9
  6. package/src/foundry/client/applications/apps/av/camera-popout.d.mts +14 -3
  7. package/src/foundry/client/applications/apps/av/cameras.d.mts +14 -3
  8. package/src/foundry/client/applications/apps/combat-tracker-config.d.mts +15 -3
  9. package/src/foundry/client/applications/apps/compendium-art-config.d.mts +12 -2
  10. package/src/foundry/client/applications/apps/file-picker.d.mts +11 -1
  11. package/src/foundry/client/applications/apps/image-popout.d.mts +11 -1
  12. package/src/foundry/client/applications/apps/permission-config.d.mts +12 -2
  13. package/src/foundry/client/applications/dice/roll-resolver.d.mts +14 -1
  14. package/src/foundry/client/applications/hud/container.d.mts +11 -2
  15. package/src/foundry/client/applications/hud/placeable-hud.d.mts +14 -2
  16. package/src/foundry/client/applications/settings/dependency-resolution.d.mts +17 -3
  17. package/src/foundry/client/applications/settings/menus/av-config.d.mts +12 -3
  18. package/src/foundry/client/applications/settings/menus/dice-config.d.mts +15 -3
  19. package/src/foundry/client/applications/settings/menus/font-config.d.mts +14 -2
  20. package/src/foundry/client/applications/settings/menus/prototype-overrides.d.mts +14 -3
  21. package/src/foundry/client/applications/settings/menus/ui-config.d.mts +15 -4
  22. package/src/foundry/client/applications/sheets/token/prototype-config.d.mts +17 -3
  23. package/src/foundry/client/applications/sidebar/apps/chat-popout.d.mts +12 -3
  24. package/src/foundry/client/applications/sidebar/apps/frame-viewer.d.mts +12 -3
  25. package/src/foundry/client/applications/sidebar/apps/invitation-links.d.mts +17 -3
  26. package/src/foundry/client/applications/sidebar/apps/module-management.d.mts +17 -3
  27. package/src/foundry/client/applications/sidebar/apps/support-details.d.mts +16 -3
  28. package/src/foundry/client/applications/sidebar/apps/world-config.d.mts +15 -3
  29. package/src/foundry/client/applications/sidebar/document-directory.d.mts +14 -2
  30. package/src/foundry/client/applications/sidebar/sidebar-tab.d.mts +14 -1
  31. package/src/foundry/client/applications/sidebar/sidebar.d.mts +11 -3
  32. package/src/foundry/client/applications/ui/game-pause.d.mts +12 -3
  33. package/src/foundry/client/applications/ui/hotbar.d.mts +15 -5
  34. package/src/foundry/client/applications/ui/main-menu.d.mts +13 -3
  35. package/src/foundry/client/applications/ui/players.d.mts +13 -3
  36. package/src/foundry/client/applications/ui/region-legend.d.mts +11 -2
  37. package/src/foundry/client/applications/ui/scene-controls.d.mts +15 -3
  38. package/src/foundry/client/applications/ui/scene-navigation.d.mts +12 -2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@league-of-foundry-developers/foundry-vtt-types",
4
- "version": "13.346.0-beta.20250710155653",
4
+ "version": "13.346.0-beta.20250711091515",
5
5
  "description": "TypeScript type definitions for Foundry VTT",
6
6
  "type": "module",
7
7
  "types": "./src/index.d.mts",
@@ -7,6 +7,7 @@ import type {
7
7
  ValueOf,
8
8
  AnyArray,
9
9
  Identity,
10
+ ToMethod,
10
11
  } from "#utils";
11
12
  import type EventEmitterMixin from "#common/utils/event-emitter.d.mts";
12
13
  import type ContextMenu from "../ux/context-menu.d.mts";
@@ -122,7 +123,7 @@ declare namespace ApplicationV2 {
122
123
  tabs?: Record<string, Tab>;
123
124
  }
124
125
 
125
- interface Configuration {
126
+ interface Configuration<Application extends ApplicationV2.Any = ApplicationV2.Any> {
126
127
  /**
127
128
  * An HTML element identifier used for this Application instance
128
129
  */
@@ -156,7 +157,7 @@ declare namespace ApplicationV2 {
156
157
  * containing both a handler function and an array of buttons which are
157
158
  * matched against the PointerEvent#button property.
158
159
  */
159
- actions: Record<string, ClickAction | { handler: ClickAction; buttons: number[] }>;
160
+ actions: Record<string, ClickAction<Application> | { handler: ClickAction<Application>; buttons: number[] }>;
160
161
 
161
162
  /**
162
163
  * Configuration used if the application top-level element is a form
@@ -169,6 +170,13 @@ declare namespace ApplicationV2 {
169
170
  position: Partial<Position>;
170
171
  }
171
172
 
173
+ // Note(LukeAbby): This `& object` is so that the `DEFAULT_OPTIONS` can be overridden more easily
174
+ // Without it then `static override DEFAULT_OPTIONS = { unrelatedProp: 123 }` would error.
175
+ type DefaultOptions<Application extends ApplicationV2.Any = ApplicationV2.Any> = DeepPartial<
176
+ ApplicationV2.Configuration<Application>
177
+ > &
178
+ object;
179
+
172
180
  interface Position {
173
181
  /** Window offset pixels from top */
174
182
  top: number;
@@ -325,13 +333,17 @@ declare namespace ApplicationV2 {
325
333
  type ActionTarget = HTMLElement & { dataset: { action: string } };
326
334
 
327
335
  /** An on-click action supported by the Application. Run in the context of a HandlebarsApplication. */
328
- type ClickAction = (
329
- /** The originating click event */
330
- event: PointerEvent,
336
+ type ClickAction<Application extends ApplicationV2.Any = ApplicationV2.Any> = ToMethod<
337
+ (
338
+ this: Application,
331
339
 
332
- /** The capturing HTML element which defines the [data-action] */
333
- target: HTMLElement,
334
- ) => MaybePromise<void>;
340
+ /** The originating click event */
341
+ event: PointerEvent,
342
+
343
+ /** The capturing HTML element which defines the [data-action] */
344
+ target: HTMLElement,
345
+ ) => MaybePromise<void>
346
+ >;
335
347
 
336
348
  /** A form submission handler method. Run in the context of a HandlebarsApplication */
337
349
  type FormSubmission = (
@@ -501,10 +513,10 @@ declare class ApplicationV2<
501
513
 
502
514
  /**
503
515
  * The default configuration options which are assigned to every instance of this Application class.
504
- * @privateRemarks This `& object` is so that the `DEFAULT_OPTIONS` can be overridden more easily
505
- * Without it then `static override DEFAULT_OPTIONS = { unrelatedProp: 123 }` would error.
516
+ * @privateRemarks `DefaultOptions` is designed to be more easily overrideable by having `object`
517
+ * merged into it.
506
518
  */
507
- static DEFAULT_OPTIONS: DeepPartial<ApplicationV2.Configuration> & object;
519
+ static DEFAULT_OPTIONS: ApplicationV2.DefaultOptions;
508
520
 
509
521
  /**
510
522
  * Configuration of application tabs, with an entry per tab group.
@@ -20,7 +20,7 @@ declare abstract class CategoryBrowser<
20
20
  Configuration extends CategoryBrowser.Configuration = CategoryBrowser.Configuration,
21
21
  RenderOptions extends CategoryBrowser.RenderOptions = CategoryBrowser.RenderOptions,
22
22
  > extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {
23
- static DEFAULT_OPTIONS: DeepPartial<CategoryBrowser.Configuration> & object;
23
+ static DEFAULT_OPTIONS: CategoryBrowser.DefaultOptions;
24
24
 
25
25
  static PARTS: Record<string, HandlebarsApplicationMixin.HandlebarsTemplatePart>;
26
26
 
@@ -92,7 +92,9 @@ declare namespace CategoryBrowser {
92
92
  submitButton: boolean;
93
93
  }
94
94
 
95
- interface Configuration extends HandlebarsApplicationMixin.Configuration, ApplicationV2.Configuration {
95
+ interface Configuration<CategoryBrowser extends CategoryBrowser.Any = CategoryBrowser.Any>
96
+ extends HandlebarsApplicationMixin.Configuration,
97
+ ApplicationV2.Configuration<CategoryBrowser> {
96
98
  /** The initial category tab: omitting this will result in an initial active tab that corresponds with the first category by insertion order. */
97
99
  initialCategory: string | null;
98
100
 
@@ -100,6 +102,13 @@ declare namespace CategoryBrowser {
100
102
  subtemplates: Subtemplates;
101
103
  }
102
104
 
105
+ // Note(LukeAbby): This `& object` is so that the `DEFAULT_OPTIONS` can be overridden more easily
106
+ // Without it then `static override DEFAULT_OPTIONS = { unrelatedProp: 123 }` would error.
107
+ type DefaultOptions<CategoryBrowser extends CategoryBrowser.Any = CategoryBrowser.Any> = DeepPartial<
108
+ Configuration<CategoryBrowser>
109
+ > &
110
+ object;
111
+
103
112
  interface RenderOptions extends HandlebarsApplicationMixin.RenderOptions, ApplicationV2.RenderOptions {}
104
113
 
105
114
  interface Subtemplates {
@@ -98,7 +98,7 @@ declare class DialogV2<
98
98
  Configuration extends DialogV2.Configuration = DialogV2.Configuration<any>,
99
99
  RenderOptions extends DialogV2.RenderOptions = DialogV2.RenderOptions,
100
100
  > extends ApplicationV2<RenderContext, Configuration, RenderOptions> {
101
- static override DEFAULT_OPTIONS: DeepPartial<ApplicationV2.Configuration> & object;
101
+ static override DEFAULT_OPTIONS: DialogV2.DefaultOptions;
102
102
 
103
103
  protected override _initializeApplicationOptions(options: DeepPartial<Configuration>): Configuration;
104
104
 
@@ -364,7 +364,7 @@ declare namespace DialogV2 {
364
364
 
365
365
  interface RenderContext extends ApplicationV2.RenderContext {}
366
366
 
367
- interface Configuration<Dialog extends DialogV2.Any = DialogV2.Any> extends ApplicationV2.Configuration {
367
+ interface Configuration<Dialog extends DialogV2.Any = DialogV2.Any> extends ApplicationV2.Configuration<Dialog> {
368
368
  /**
369
369
  * Modal dialogs prevent interaction with the rest of the UI until they are dismissed or submitted.
370
370
  */
@@ -393,6 +393,10 @@ declare namespace DialogV2 {
393
393
  submit?: SubmitCallback<unknown, Dialog> | null | undefined;
394
394
  }
395
395
 
396
+ // Note(LukeAbby): This `& object` is so that the `DEFAULT_OPTIONS` can be overridden more easily
397
+ // Without it then `static override DEFAULT_OPTIONS = { unrelatedProp: 123 }` would error.
398
+ type DefaultOptions<Dialog extends DialogV2.Any = DialogV2.Any> = DeepPartial<Configuration<Dialog>> & object;
399
+
396
400
  interface RenderOptions extends ApplicationV2.RenderOptions {}
397
401
 
398
402
  type Content<Data extends AnyObject, BaseType extends string | HTMLDivElement = string | HTMLDivElement> = BaseType &
@@ -24,7 +24,10 @@ declare namespace DocumentSheetV2 {
24
24
  rootId: string;
25
25
  }
26
26
 
27
- interface Configuration<ConcreteDocument extends Document.Any> extends _Configuration {
27
+ interface Configuration<
28
+ ConcreteDocument extends Document.Any,
29
+ DocumentSheet extends DocumentSheetV2.Any = DocumentSheetV2.Any,
30
+ > extends _Configuration<DocumentSheet> {
28
31
  /**
29
32
  * The Document instance associated with this sheet
30
33
  */
@@ -38,7 +41,8 @@ declare namespace DocumentSheetV2 {
38
41
  };
39
42
 
40
43
  /** @internal */
41
- interface _Configuration extends ApplicationV2.Configuration {
44
+ interface _Configuration<DocumentSheet extends DocumentSheetV2.Any = DocumentSheetV2.Any>
45
+ extends ApplicationV2.Configuration<DocumentSheet> {
42
46
  /**
43
47
  * A permission level in CONST.DOCUMENT_OWNERSHIP_LEVELS
44
48
  */
@@ -62,13 +66,16 @@ declare namespace DocumentSheetV2 {
62
66
 
63
67
  // Note(LukeAbby): This `& object` is so that the `DEFAULT_OPTIONS` can be overridden more easily
64
68
  // Without it then `static override DEFAULT_OPTIONS = { unrelatedProp: 123 }` would error.
65
- interface DefaultOptions extends DeepPartial<_Configuration>, Identity<object> {
66
- /**
67
- * @deprecated Setting `document` in `DocumentSheetV2.DEFAULT_OPTIONS` is not supported. If you
68
- * have a need for this, please file an issue.
69
- */
70
- document?: never;
71
- }
69
+ type DefaultOptions<DocumentSheet extends DocumentSheetV2.Any = DocumentSheetV2.Any> = DeepPartial<
70
+ _Configuration<DocumentSheet>
71
+ > &
72
+ object & {
73
+ /**
74
+ * @deprecated Setting `document` in `DocumentSheetV2.DEFAULT_OPTIONS` is not supported. If you
75
+ * have a need for this, please file an issue.
76
+ */
77
+ document?: never;
78
+ };
72
79
 
73
80
  interface RenderOptions extends ApplicationV2.RenderOptions {
74
81
  /** A string with the format "\{operation\}\{documentName\}" providing context */
@@ -1,4 +1,4 @@
1
- import type { Identity } from "#utils";
1
+ import type { DeepPartial, Identity } from "#utils";
2
2
  import type ApplicationV2 from "../../api/application.d.mts";
3
3
  import type HandlebarsApplicationMixin from "../../api/handlebars-application.d.mts";
4
4
 
@@ -18,7 +18,9 @@ declare class CameraPopout<
18
18
  RenderContext extends CameraPopout.RenderContext = CameraPopout.RenderContext,
19
19
  Configuration extends CameraPopout.Configuration = CameraPopout.Configuration,
20
20
  RenderOptions extends CameraPopout.RenderOptions = CameraPopout.RenderOptions,
21
- > extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {}
21
+ > extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {
22
+ static override DEFAULT_OPTIONS: CameraPopout.DefaultOptions;
23
+ }
22
24
 
23
25
  declare namespace CameraPopout {
24
26
  interface Any extends AnyCameraPopout {}
@@ -28,10 +30,19 @@ declare namespace CameraPopout {
28
30
  rootId: string;
29
31
  }
30
32
 
31
- interface Configuration extends HandlebarsApplicationMixin.Configuration, ApplicationV2.Configuration {
33
+ interface Configuration<CameraPopout extends CameraPopout.Any = CameraPopout.Any>
34
+ extends HandlebarsApplicationMixin.Configuration,
35
+ ApplicationV2.Configuration<CameraPopout> {
32
36
  user: User.Implementation;
33
37
  }
34
38
 
39
+ // Note(LukeAbby): This `& object` is so that the `DEFAULT_OPTIONS` can be overridden more easily
40
+ // Without it then `static override DEFAULT_OPTIONS = { unrelatedProp: 123 }` would error.
41
+ type DefaultOptions<CameraPopout extends CameraPopout.Any = CameraPopout.Any> = DeepPartial<
42
+ Configuration<CameraPopout>
43
+ > &
44
+ object;
45
+
35
46
  interface RenderOptions extends HandlebarsApplicationMixin.RenderOptions, ApplicationV2.RenderOptions {}
36
47
  }
37
48
 
@@ -1,6 +1,6 @@
1
1
  import type ApplicationV2 from "../../api/application.d.mts";
2
2
  import type HandlebarsApplicationMixin from "../../api/handlebars-application.d.mts";
3
- import type { Identity } from "#utils";
3
+ import type { DeepPartial, Identity } from "#utils";
4
4
 
5
5
  import AVSettings = foundry.av.AVSettings;
6
6
 
@@ -20,14 +20,25 @@ declare class CameraViews<
20
20
  RenderContext extends CameraViews.RenderContext = CameraViews.RenderContext,
21
21
  Configuration extends CameraViews.Configuration = CameraViews.Configuration,
22
22
  RenderOptions extends CameraViews.RenderOptions = CameraViews.RenderOptions,
23
- > extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {}
23
+ > extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {
24
+ static override DEFAULT_OPTIONS: CameraViews.DefaultOptions;
25
+ }
24
26
 
25
27
  declare namespace CameraViews {
26
28
  interface Any extends AnyCameraViews {}
27
29
  interface AnyConstructor extends Identity<typeof AnyCameraViews> {}
28
30
 
29
31
  interface RenderContext extends HandlebarsApplicationMixin.RenderContext, ApplicationV2.RenderContext {}
30
- interface Configuration extends HandlebarsApplicationMixin.Configuration, ApplicationV2.Configuration {}
32
+
33
+ interface Configuration<CameraViews extends CameraViews.Any = CameraViews.Any>
34
+ extends HandlebarsApplicationMixin.Configuration,
35
+ ApplicationV2.Configuration<CameraViews> {}
36
+
37
+ // Note(LukeAbby): This `& object` is so that the `DEFAULT_OPTIONS` can be overridden more easily
38
+ // Without it then `static override DEFAULT_OPTIONS = { unrelatedProp: 123 }` would error.
39
+ type DefaultOptions<CameraViews extends CameraViews.Any = CameraViews.Any> = DeepPartial<Configuration<CameraViews>> &
40
+ object;
41
+
31
42
  interface RenderOptions extends HandlebarsApplicationMixin.RenderOptions, ApplicationV2.RenderOptions {}
32
43
 
33
44
  interface ControlContext {
@@ -1,6 +1,6 @@
1
1
  import type ApplicationV2 from "../api/application.d.mts";
2
2
  import type HandlebarsApplicationMixin from "../api/handlebars-application.d.mts";
3
- import type { Identity } from "#utils";
3
+ import type { DeepPartial, Identity } from "#utils";
4
4
 
5
5
  declare module "#configuration" {
6
6
  namespace Hooks {
@@ -18,7 +18,9 @@ declare class CombatTrackerConfig<
18
18
  RenderContext extends CombatTrackerConfig.RenderContext = CombatTrackerConfig.RenderContext,
19
19
  Configuration extends CombatTrackerConfig.Configuration = CombatTrackerConfig.Configuration,
20
20
  RenderOptions extends CombatTrackerConfig.RenderOptions = CombatTrackerConfig.RenderOptions,
21
- > extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {}
21
+ > extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {
22
+ static override DEFAULT_OPTIONS: CombatTrackerConfig.DefaultOptions;
23
+ }
22
24
 
23
25
  declare namespace CombatTrackerConfig {
24
26
  interface Any extends AnyCombatTrackerConfig {}
@@ -32,7 +34,17 @@ declare namespace CombatTrackerConfig {
32
34
  rootId: string;
33
35
  }
34
36
 
35
- interface Configuration extends HandlebarsApplicationMixin.Configuration, ApplicationV2.Configuration {}
37
+ interface Configuration<CombatTrackerConfig extends CombatTrackerConfig.Any = CombatTrackerConfig.Any>
38
+ extends HandlebarsApplicationMixin.Configuration,
39
+ ApplicationV2.Configuration<CombatTrackerConfig> {}
40
+
41
+ // Note(LukeAbby): This `& object` is so that the `DEFAULT_OPTIONS` can be overridden more easily
42
+ // Without it then `static override DEFAULT_OPTIONS = { unrelatedProp: 123 }` would error.
43
+ type DefaultOptions<CombatTrackerConfig extends CombatTrackerConfig.Any = CombatTrackerConfig.Any> = DeepPartial<
44
+ Configuration<CombatTrackerConfig>
45
+ > &
46
+ object;
47
+
36
48
  interface RenderOptions extends HandlebarsApplicationMixin.RenderOptions, ApplicationV2.RenderOptions {}
37
49
  }
38
50
 
@@ -27,7 +27,7 @@ declare class CompendiumArtConfig<
27
27
  // placeholder private member to help subclassing
28
28
  #compendiumArtConfig: true;
29
29
 
30
- static override DEFAULT_OPTIONS: Partial<CompendiumArtConfig.Configuration>;
30
+ static override DEFAULT_OPTIONS: CompendiumArtConfig.DefaultOptions;
31
31
  static override PARTS: CompendiumArtConfigParts;
32
32
 
33
33
  /* -------------------------------------------- */
@@ -50,7 +50,17 @@ declare namespace CompendiumArtConfig {
50
50
  buttons: ApplicationV2.FormFooterButton[];
51
51
  }
52
52
 
53
- interface Configuration extends HandlebarsApplicationMixin.Configuration, ApplicationV2.Configuration {}
53
+ interface Configuration<CompendiumArtConfig extends CompendiumArtConfig.Any = CompendiumArtConfig.Any>
54
+ extends HandlebarsApplicationMixin.Configuration,
55
+ ApplicationV2.Configuration<CompendiumArtConfig> {}
56
+
57
+ // Note(LukeAbby): This `& object` is so that the `DEFAULT_OPTIONS` can be overridden more easily
58
+ // Without it then `static override DEFAULT_OPTIONS = { unrelatedProp: 123 }` would error.
59
+ type DefaultOptions<CompendiumArtConfig extends CompendiumArtConfig.Any = CompendiumArtConfig.Any> = DeepPartial<
60
+ Configuration<CompendiumArtConfig>
61
+ > &
62
+ object;
63
+
54
64
  interface RenderOptions extends HandlebarsApplicationMixin.RenderOptions, ApplicationV2.RenderOptions {}
55
65
 
56
66
  interface Parts {
@@ -20,6 +20,9 @@ declare class FilePicker<
20
20
  Configuration extends FilePicker.Configuration = FilePicker.Configuration,
21
21
  RenderOptions extends FilePicker.RenderOptions = FilePicker.RenderOptions,
22
22
  > extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {
23
+ // Fake override.
24
+ static override DEFAULT_OPTIONS: FilePicker.DefaultOptions;
25
+
23
26
  /**
24
27
  * The full requested path given by the user
25
28
  * @defaultValue `""`
@@ -317,7 +320,9 @@ declare namespace FilePicker {
317
320
  img: string;
318
321
  }
319
322
 
320
- interface Configuration extends HandlebarsApplicationMixin.Configuration, ApplicationV2.Configuration {
323
+ interface Configuration<FilePicker extends FilePicker.Any = FilePicker.Any>
324
+ extends HandlebarsApplicationMixin.Configuration,
325
+ ApplicationV2.Configuration<FilePicker> {
321
326
  /**
322
327
  * A type of file to target.
323
328
  * @defaultValue `"any"`
@@ -364,6 +369,11 @@ declare namespace FilePicker {
364
369
  redirectToRoot?: string[] | null | undefined;
365
370
  }
366
371
 
372
+ // Note(LukeAbby): This `& object` is so that the `DEFAULT_OPTIONS` can be overridden more easily
373
+ // Without it then `static override DEFAULT_OPTIONS = { unrelatedProp: 123 }` would error.
374
+ type DefaultOptions<FilePicker extends FilePicker.Any = FilePicker.Any> = DeepPartial<Configuration<FilePicker>> &
375
+ object;
376
+
367
377
  interface RenderOptions extends HandlebarsApplicationMixin.RenderOptions, ApplicationV2.RenderOptions {}
368
378
 
369
379
  interface FavoriteFolder {
@@ -37,6 +37,9 @@ declare class ImagePopout<
37
37
  RenderOptions extends ImagePopout.RenderOptions = ImagePopout.RenderOptions,
38
38
  > extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {
39
39
  constructor(options: DeepPartial<Configuration> & { src: string });
40
+
41
+ // Fake override.
42
+ static override DEFAULT_OPTIONS: ImagePopout.DefaultOptions;
40
43
  }
41
44
 
42
45
  declare namespace ImagePopout {
@@ -55,7 +58,9 @@ declare namespace ImagePopout {
55
58
  altText: string;
56
59
  }
57
60
 
58
- interface Configuration extends HandlebarsApplicationMixin.Configuration, ApplicationV2.Configuration {
61
+ interface Configuration<ImagePopout extends ImagePopout.Any = ImagePopout.Any>
62
+ extends HandlebarsApplicationMixin.Configuration,
63
+ ApplicationV2.Configuration<ImagePopout> {
59
64
  /** The URL to the image or video file */
60
65
  src: string;
61
66
 
@@ -72,6 +77,11 @@ declare namespace ImagePopout {
72
77
  showTitle?: boolean | null | undefined;
73
78
  }
74
79
 
80
+ // Note(LukeAbby): This `& object` is so that the `DEFAULT_OPTIONS` can be overridden more easily
81
+ // Without it then `static override DEFAULT_OPTIONS = { unrelatedProp: 123 }` would error.
82
+ type DefaultOptions<ImagePopout extends ImagePopout.Any = ImagePopout.Any> = DeepPartial<Configuration<ImagePopout>> &
83
+ object;
84
+
75
85
  interface RenderOptions extends HandlebarsApplicationMixin.RenderOptions, ApplicationV2.RenderOptions {}
76
86
 
77
87
  interface ShareImageConfig {
@@ -23,7 +23,7 @@ declare class PermissionConfig<
23
23
  // placeholder private member to help subclassing
24
24
  #permissionConfig: true;
25
25
 
26
- static override DEFAULT_OPTIONS: Partial<ApplicationV2.Configuration>;
26
+ static override DEFAULT_OPTIONS: PermissionConfig.DefaultOptions;
27
27
  static override PARTS: InterfaceToObject<PermissionConfig.Parts>;
28
28
 
29
29
  /* -------------------------------------------- */
@@ -56,7 +56,17 @@ declare namespace PermissionConfig {
56
56
  buttons: ApplicationV2.FormFooterButton[];
57
57
  }
58
58
 
59
- interface Configuration extends HandlebarsApplicationMixin.Configuration, ApplicationV2.Configuration {}
59
+ interface Configuration<PermissionConfig extends PermissionConfig.Any = PermissionConfig.Any>
60
+ extends HandlebarsApplicationMixin.Configuration,
61
+ ApplicationV2.Configuration<PermissionConfig> {}
62
+
63
+ // Note(LukeAbby): This `& object` is so that the `DEFAULT_OPTIONS` can be overridden more easily
64
+ // Without it then `static override DEFAULT_OPTIONS = { unrelatedProp: 123 }` would error.
65
+ type DefaultOptions<PermissionConfig extends PermissionConfig.Any = PermissionConfig.Any> = DeepPartial<
66
+ Configuration<PermissionConfig>
67
+ > &
68
+ object;
69
+
60
70
  interface RenderOptions extends HandlebarsApplicationMixin.RenderOptions, ApplicationV2.RenderOptions {}
61
71
 
62
72
  interface Parts {
@@ -22,6 +22,9 @@ declare class RollResolver<
22
22
  > extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {
23
23
  constructor(roll: Roll, options?: DeepPartial<Configuration>);
24
24
 
25
+ // Fake override.
26
+ static override DEFAULT_OPTIONS: RollResolver.DefaultOptions;
27
+
25
28
  // a placeholder private method to help subclassing
26
29
  #rollResolver: true;
27
30
 
@@ -103,7 +106,17 @@ declare namespace RollResolver {
103
106
  groups: Record<string, Group>;
104
107
  }
105
108
 
106
- interface Configuration extends HandlebarsApplicationMixin.Configuration, ApplicationV2.Configuration {}
109
+ interface Configuration<RollResolver extends RollResolver.Any = RollResolver.Any>
110
+ extends HandlebarsApplicationMixin.Configuration,
111
+ ApplicationV2.Configuration<RollResolver> {}
112
+
113
+ // Note(LukeAbby): This `& object` is so that the `DEFAULT_OPTIONS` can be overridden more easily
114
+ // Without it then `static override DEFAULT_OPTIONS = { unrelatedProp: 123 }` would error.
115
+ type DefaultOptions<RollResolver extends RollResolver.Any = RollResolver.Any> = DeepPartial<
116
+ Configuration<RollResolver>
117
+ > &
118
+ object;
119
+
107
120
  interface RenderOptions extends HandlebarsApplicationMixin.RenderOptions, ApplicationV2.RenderOptions {}
108
121
 
109
122
  interface Group {
@@ -1,4 +1,4 @@
1
- import type { Identity } from "#utils";
1
+ import type { DeepPartial, Identity } from "#utils";
2
2
  import type ApplicationV2 from "../api/application.d.mts";
3
3
  import type DrawingHUD from "./drawing-hud.d.mts";
4
4
  import type TileHUD from "./tile-hud.d.mts";
@@ -21,6 +21,9 @@ declare class HeadsUpDisplayContainer<
21
21
  Configuration extends HeadsUpDisplayContainer.Configuration = HeadsUpDisplayContainer.Configuration,
22
22
  RenderOptions extends HeadsUpDisplayContainer.RenderOptions = HeadsUpDisplayContainer.RenderOptions,
23
23
  > extends ApplicationV2<RenderContext, Configuration, RenderOptions> {
24
+ // Fake override.
25
+ static override DEFAULT_OPTIONS: HeadsUpDisplayContainer.DefaultOptions;
26
+
24
27
  token: TokenHUD;
25
28
 
26
29
  tile: TileHUD;
@@ -34,7 +37,13 @@ declare namespace HeadsUpDisplayContainer {
34
37
 
35
38
  interface RenderContext extends ApplicationV2.RenderContext {}
36
39
 
37
- interface Configuration extends ApplicationV2.Configuration {}
40
+ interface Configuration<HeadsUpDisplayContainer extends HeadsUpDisplayContainer.Any = HeadsUpDisplayContainer.Any>
41
+ extends ApplicationV2.Configuration<HeadsUpDisplayContainer> {}
42
+
43
+ // Note(LukeAbby): This `& object` is so that the `DEFAULT_OPTIONS` can be overridden more easily
44
+ // Without it then `static override DEFAULT_OPTIONS = { unrelatedProp: 123 }` would error.
45
+ type DefaultOptions<HeadsUpDisplayContainer extends HeadsUpDisplayContainer.Any = HeadsUpDisplayContainer.Any> =
46
+ DeepPartial<Configuration<HeadsUpDisplayContainer>> & object;
38
47
 
39
48
  interface RenderOptions extends ApplicationV2.RenderOptions {}
40
49
  }
@@ -1,4 +1,4 @@
1
- import type { Identity } from "#utils";
1
+ import type { DeepPartial, Identity } from "#utils";
2
2
  import type ApplicationV2 from "../api/application.d.mts";
3
3
  import type { PlaceableObject } from "#client/canvas/placeables/_module.d.mts";
4
4
 
@@ -20,6 +20,9 @@ declare class BasePlaceableHUD<
20
20
  Configuration extends BasePlaceableHUD.Configuration = BasePlaceableHUD.Configuration,
21
21
  RenderOptions extends BasePlaceableHUD.RenderOptions = BasePlaceableHUD.RenderOptions,
22
22
  > extends ApplicationV2<RenderContext, Configuration, RenderOptions> {
23
+ // Fake override.
24
+ static override DEFAULT_OPTIONS: BasePlaceableHUD.DefaultOptions;
25
+
23
26
  /**
24
27
  * Reference a PlaceableObject this HUD is currently bound to.
25
28
  */
@@ -50,7 +53,16 @@ declare namespace BasePlaceableHUD {
50
53
  // TODO: Remaining properties
51
54
  }
52
55
 
53
- interface Configuration extends ApplicationV2.Configuration {}
56
+ interface Configuration<BasePlaceableHUD extends BasePlaceableHUD.Any = BasePlaceableHUD.Any>
57
+ extends ApplicationV2.Configuration<BasePlaceableHUD> {}
58
+
59
+ // Note(LukeAbby): This `& object` is so that the `DEFAULT_OPTIONS` can be overridden more easily
60
+ // Without it then `static override DEFAULT_OPTIONS = { unrelatedProp: 123 }` would error.
61
+ type DefaultOptions<BasePlaceableHUD extends BasePlaceableHUD.Any = BasePlaceableHUD.Any> = DeepPartial<
62
+ Configuration<BasePlaceableHUD>
63
+ > &
64
+ object;
65
+
54
66
  interface RenderOptions extends ApplicationV2.RenderOptions {}
55
67
  }
56
68
 
@@ -1,4 +1,4 @@
1
- import type { Identity } from "#utils";
1
+ import type { DeepPartial, Identity } from "#utils";
2
2
  import type ApplicationV2 from "../api/application.d.mts";
3
3
  import type HandlebarsApplicationMixin from "../api/handlebars-application.d.mts";
4
4
 
@@ -18,14 +18,28 @@ declare class DependencyResolution<
18
18
  RenderContext extends DependencyResolution.RenderContext = DependencyResolution.RenderContext,
19
19
  Configuration extends DependencyResolution.Configuration = DependencyResolution.Configuration,
20
20
  RenderOptions extends DependencyResolution.RenderOptions = DependencyResolution.RenderOptions,
21
- > extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {}
21
+ > extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {
22
+ // Fake override.
23
+ static override DEFAULT_OPTIONS: DependencyResolution.DefaultOptions;
24
+ }
22
25
 
23
26
  declare namespace DependencyResolution {
24
27
  interface Any extends AnyRollResolver {}
25
28
  interface AnyConstructor extends Identity<typeof AnyRollResolver> {}
26
29
 
27
30
  interface RenderContext extends HandlebarsApplicationMixin.RenderContext, ApplicationV2.RenderContext {}
28
- interface Configuration extends HandlebarsApplicationMixin.Configuration, ApplicationV2.Configuration {}
31
+
32
+ interface Configuration<DependencyResolution extends DependencyResolution.Any = DependencyResolution.Any>
33
+ extends HandlebarsApplicationMixin.Configuration,
34
+ ApplicationV2.Configuration<DependencyResolution> {}
35
+
36
+ // Note(LukeAbby): This `& object` is so that the `DEFAULT_OPTIONS` can be overridden more easily
37
+ // Without it then `static override DEFAULT_OPTIONS = { unrelatedProp: 123 }` would error.
38
+ type DefaultOptions<DependencyResolution extends DependencyResolution.Any = DependencyResolution.Any> = DeepPartial<
39
+ Configuration<DependencyResolution>
40
+ > &
41
+ object;
42
+
29
43
  interface RenderOptions extends HandlebarsApplicationMixin.RenderOptions, ApplicationV2.RenderOptions {}
30
44
  }
31
45
 
@@ -1,6 +1,6 @@
1
1
  import type ApplicationV2 from "../../api/application.d.mts";
2
2
  import type HandlebarsApplicationMixin from "../../api/handlebars-application.d.mts";
3
- import type { Identity } from "#utils";
3
+ import type { DeepPartial, Identity } from "#utils";
4
4
 
5
5
  import AVMaster = foundry.av.AVMaster;
6
6
 
@@ -20,7 +20,10 @@ declare class AVConfig<
20
20
  RenderContext extends AVConfig.RenderContext = AVConfig.RenderContext,
21
21
  Configuration extends AVConfig.Configuration = AVConfig.Configuration,
22
22
  RenderOptions extends AVConfig.RenderOptions = AVConfig.RenderOptions,
23
- > extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {}
23
+ > extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {
24
+ // Fake override.
25
+ static override DEFAULT_OPTIONS: AVConfig.DefaultOptions;
26
+ }
24
27
 
25
28
  declare namespace AVConfig {
26
29
  interface Any extends AnyAVConfig {}
@@ -28,7 +31,9 @@ declare namespace AVConfig {
28
31
 
29
32
  interface RenderContext extends HandlebarsApplicationMixin.RenderContext, ApplicationV2.RenderContext {}
30
33
 
31
- interface Configuration extends HandlebarsApplicationMixin.Configuration, ApplicationV2.Configuration {
34
+ interface Configuration<AVConfig extends AVConfig.Any = AVConfig.Any>
35
+ extends HandlebarsApplicationMixin.Configuration,
36
+ ApplicationV2.Configuration<AVConfig> {
32
37
  /**
33
38
  * The AVMaster instance being configured
34
39
  * @defaultValue `game.webrtc`
@@ -36,6 +41,10 @@ declare namespace AVConfig {
36
41
  webrtc?: AVMaster;
37
42
  }
38
43
 
44
+ // Note(LukeAbby): This `& object` is so that the `DEFAULT_OPTIONS` can be overridden more easily
45
+ // Without it then `static override DEFAULT_OPTIONS = { unrelatedProp: 123 }` would error.
46
+ type DefaultOptions<AVConfig extends AVConfig.Any = AVConfig.Any> = DeepPartial<Configuration<AVConfig>> & object;
47
+
39
48
  interface RenderOptions extends HandlebarsApplicationMixin.RenderOptions, ApplicationV2.RenderOptions {}
40
49
  }
41
50
 
@@ -1,4 +1,4 @@
1
- import type { Identity } from "#utils";
1
+ import type { DeepPartial, Identity } from "#utils";
2
2
  import type ApplicationV2 from "../../api/application.d.mts";
3
3
  import type HandlebarsApplicationMixin from "../../api/handlebars-application.d.mts";
4
4
 
@@ -17,14 +17,26 @@ declare class DiceConfig<
17
17
  RenderContext extends DiceConfig.RenderContext = DiceConfig.RenderContext,
18
18
  Configuration extends DiceConfig.Configuration = DiceConfig.Configuration,
19
19
  RenderOptions extends DiceConfig.RenderOptions = DiceConfig.RenderOptions,
20
- > extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {}
20
+ > extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {
21
+ // Fake override.
22
+ static override DEFAULT_OPTIONS: DiceConfig.DefaultOptions;
23
+ }
21
24
 
22
25
  declare namespace DiceConfig {
23
26
  interface Any extends AnyDiceConfig {}
24
27
  interface AnyConstructor extends Identity<typeof AnyDiceConfig> {}
25
28
 
26
29
  interface RenderContext extends HandlebarsApplicationMixin.RenderContext, ApplicationV2.RenderContext {}
27
- interface Configuration extends HandlebarsApplicationMixin.Configuration, ApplicationV2.Configuration {}
30
+
31
+ interface Configuration<DiceConfig extends DiceConfig.Any = DiceConfig.Any>
32
+ extends HandlebarsApplicationMixin.Configuration,
33
+ ApplicationV2.Configuration<DiceConfig> {}
34
+
35
+ // Note(LukeAbby): This `& object` is so that the `DEFAULT_OPTIONS` can be overridden more easily
36
+ // Without it then `static override DEFAULT_OPTIONS = { unrelatedProp: 123 }` would error.
37
+ type DefaultOptions<DiceConfig extends DiceConfig.Any = DiceConfig.Any> = DeepPartial<Configuration<DiceConfig>> &
38
+ object;
39
+
28
40
  interface RenderOptions extends HandlebarsApplicationMixin.RenderOptions, ApplicationV2.RenderOptions {}
29
41
  }
30
42