Repository: League-of-Foundry-Developers/foundry-vtt-types
Pull request #2774 (2024-08-09 17:40:46)

Linting, Roll Migration
- Attempted to resolve many linting issues
  - Did not touch some complicated files (`common/abstract/data` and `common/abstract/document`) nor files currently subject to PRs (prosemirror, shaders)
- Deleted the Roll-related files in `client`

Sidebar: Should we just... delete DataConfig and SourceConfig since those are from the v8/v9 configuration setup, pre-data models?

LukeAbby: In theory `DataConfig` and `SourceConfig` still serve a purpose for systems that have a `template.json` but go without.

We could just roll it into `DataModelConfig` but `DataConfig` and `SourceConfig` are backwards compatible... but I'm not sure how valuable that is anymore.
JPMeehan: > In theory `DataConfig` and `SourceConfig` still serve a purpose for systems that have a `template.json` but go without a data model.
> 
> We could just roll it into `DataModelConfig` but `DataConfig` and `SourceConfig` are backwards compatible... but I'm not sure how valuable that is anymore.

Currently, TypeDataField doesn't leverage those two setups. My inclination is that this project should focus on supporting Foundry's intended runtime validation, data models.
LukeAbby: As far as I understand it, `TypeDataField` will _never_ leverage those two because `TypeDataField` is inherently for when a system actually sets up a data model. This is for the case where they have a `template.json` but not data models.

It honestly doesn't add much complexity to keep supporting. Some systems don't want to use data models, I say let them. If it were more complex I'd possibly be swayed by the argument that we're trying to maintain high quality and robustly typed code anyways but it's about as complex as adding something like `DataConfig extends { readonly [_ in DocumentName]: { [_ in DocumentType]: infer DataModel } } ? DataModel : EmptyObject` or something similar.
JPMeehan: `TypeDataField` is where the `template.json` gets used - see `getInitialValue` and `_cleanType`. On the server backend, where community packages can't register data models, they're functionally identical,

Anyways, if we want to keep supporting those I'm fine with that but we'll need to update the definition of the field to re-use DataConfig/SourceConfig. We may also want to double check how those are implemented because of the structural changes for documents.

Patch:
diff --git a/package.json b/package.json
index 206fd680a..be02447cb 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
 {
   "$schema": "https://json.schemastore.org/package.json",
   "name": "@league-of-foundry-developers/foundry-vtt-types",
-  "version": "12.329.0",
+  "version": "12.330.0",
   "description": "TypeScript type definitions for Foundry VTT",
   "type": "module",
   "exports": {
diff --git a/src/foundry/client-esm/applications/_types.d.mts b/src/foundry/client-esm/applications/_types.d.mts
index cb93bbe4a..caefda43c 100644
--- a/src/foundry/client-esm/applications/_types.d.mts
+++ b/src/foundry/client-esm/applications/_types.d.mts
@@ -13,26 +13,26 @@ export {};
 // is also a class in `src/foundry/common/config.d.mts`. It's also just nice to
 // have as reference to keep us synced with the latest version of Foundry.
 
-interface ApplicationConfiguration extends ApplicationV2.Configuration {}
+type ApplicationConfiguration = ApplicationV2.Configuration;
 
-interface ApplicationFormConfiguration extends ApplicationV2.FormConfiguration {}
+type ApplicationFormConfiguration = ApplicationV2.FormConfiguration;
 
-interface ApplicationHeaderControlsEntry extends ApplicationV2.HeaderControlsEntry {}
+type ApplicationHeaderControlsEntry = ApplicationV2.HeaderControlsEntry;
 
-interface ApplicationConstructorParams extends ApplicationV2.ConstructorParams {}
+type ApplicationConstructorParams = ApplicationV2.ConstructorParams;
 
-interface ApplicationRenderOptions extends ApplicationV2.RenderOptions {}
+type ApplicationRenderOptions = ApplicationV2.RenderOptions;
 
-interface ApplicationWindowRenderOptions extends ApplicationV2.WindowRenderOptions {}
+type ApplicationWindowRenderOptions = ApplicationV2.WindowRenderOptions;
 
-interface ApplicationClosingOptions extends ApplicationV2.ClosingOptions {}
+type ApplicationClosingOptions = ApplicationV2.ClosingOptions;
 
-interface ApplicationClickAction extends ApplicationV2.ClickAction {}
+type ApplicationClickAction = ApplicationV2.ClickAction;
 
-interface ApplicationFormSubmission extends ApplicationV2.FormSubmission {}
+type ApplicationFormSubmission = ApplicationV2.FormSubmission;
 
-interface ApplicationTab extends ApplicationV2.Tab {}
+type ApplicationTab = ApplicationV2.Tab;
 
-interface FormNode extends ApplicationV2.FormNode {}
+type FormNode = ApplicationV2.FormNode;
 
-interface FormFooterButton extends ApplicationV2.FormFooterButton {}
+type FormFooterButton = ApplicationV2.FormFooterButton;
diff --git a/src/foundry/client-esm/applications/api/application.d.mts b/src/foundry/client-esm/applications/api/application.d.mts
index ce774f435..dc98d144c 100644
--- a/src/foundry/client-esm/applications/api/application.d.mts
+++ b/src/foundry/client-esm/applications/api/application.d.mts
@@ -27,7 +27,7 @@ declare namespace ApplicationV2 {
   interface Internal<
     Configuration extends ApplicationV2.Configuration,
     RenderOptions extends ApplicationV2.RenderOptions,
-    RenderContext extends Record<string, unknown>,
+    RenderContext extends AnyObject,
   > {
     readonly [__Configuration]: Configuration;
     readonly [__RenderOptions]: RenderOptions;
@@ -457,12 +457,7 @@ declare class ApplicationV2<
    * @param content - The content element into which the rendered result must be inserted
    * @param options - Options which configure application rendering behavior
    */
-  protected _replaceHTML(
-    // TODO: Ignore warning?
-    result: Awaited<ReturnType<this["_renderHTML"]>>,
-    content: HTMLElement,
-    options: DeepPartial<RenderOptions>,
-  ): void;
+  protected _replaceHTML(result: unknown, content: HTMLElement, options: DeepPartial<RenderOptions>): void;
 
   /**
    * Render the outer framing HTMLElement which wraps the inner HTML of the Application.
diff --git a/src/foundry/client-esm/applications/api/dialog.d.mts b/src/foundry/client-esm/applications/api/dialog.d.mts
index 34ca4bce4..3cf8b6daa 100644
--- a/src/foundry/client-esm/applications/api/dialog.d.mts
+++ b/src/foundry/client-esm/applications/api/dialog.d.mts
@@ -1,4 +1,4 @@
-import type { DeepPartial, EmptyObject } from "../../../../types/utils.d.mts";
+import type { AnyFunction, DeepPartial, EmptyObject } from "../../../../types/utils.d.mts";
 import type ApplicationV2 from "./application.d.mts";
 
 /**
@@ -65,13 +65,10 @@ declare class DialogV2 extends ApplicationV2<EmptyObject, DialogV2.Configuration
   static override DEFAULT_OPTIONS: DeepPartial<ApplicationV2.Configuration>;
 
   protected override _initializeApplicationOptions(
-    options: Partial<DialogV2.Configuration>,
-  ): Partial<DialogV2.Configuration>;
+    options: DeepPartial<DialogV2.Configuration>,
+  ): DeepPartial<DialogV2.Configuration>;
 
-  protected override _renderHTML(
-    _context: ApplicationV2.RenderContext,
-    _options: DialogV2.Configuration,
-  ): Promise<HTMLFormElement>;
+  protected override _renderHTML(_context: unknown, _options: ApplicationV2.RenderOptions): Promise<HTMLFormElement>;
 
   /**
    * Render configured buttons.
@@ -85,15 +82,12 @@ declare class DialogV2 extends ApplicationV2<EmptyObject, DialogV2.Configuration
    */
   protected _onSubmit(target: HTMLButtonElement, event: PointerEvent | SubmitEvent): Promise<DialogV2>;
 
-  protected override _onFirstRender(
-    _context: ApplicationV2.RenderContext,
-    _options: Partial<DialogV2.Configuration>,
-  ): void;
+  protected override _onFirstRender(_context: EmptyObject, _options: DeepPartial<ApplicationV2.RenderOptions>): void;
 
   protected override _replaceHTML(
     result: HTMLFormElement,
     content: HTMLElement,
-    _options: Partial<DialogV2.Configuration>,
+    _options: DeepPartial<ApplicationV2.RenderOptions>,
   ): void;
 
   /**
@@ -265,7 +259,7 @@ type InferDismissType<Options extends Partial<DialogV2.WaitOptions>> = Options["
 type InferButtonReturnTypes<Options extends Partial<DialogV2.WaitOptions>> =
   Options["buttons"] extends Array<infer Button>
     ? Button extends DialogV2.Button<infer Callback>
-      ? Button["callback"] extends Function
+      ? Button["callback"] extends AnyFunction
         ? Callback
         : string
       : never
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 0e27e1a54..d461bcdff 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 { DeepPartial } from "../../../../types/utils.d.mts";
+import type { AnyObject, DeepPartial, EmptyObject } from "../../../../types/utils.d.mts";
 import type ApplicationV2 from "./application.d.mts";
 
 declare namespace DocumentSheetV2 {
@@ -40,7 +40,7 @@ declare namespace DocumentSheetV2 {
  */
 declare class DocumentSheetV2<
   Document extends foundry.abstract.Document<any, any, any>,
-  RenderContext extends Record<string, unknown> = Record<string, never>,
+  RenderContext extends AnyObject = EmptyObject,
   Configuration extends DocumentSheetV2.Configuration<Document> = DocumentSheetV2.Configuration<Document>,
   RenderOptions extends DocumentSheetV2.RenderOptions = DocumentSheetV2.RenderOptions,
 > extends ApplicationV2<RenderContext, Configuration, RenderOptions> {
@@ -74,10 +74,7 @@ declare class DocumentSheetV2<
 
   protected override _canRender(options: DeepPartial<RenderOptions>): false | void;
 
-  protected override _onFirstRender(
-    context: DeepPartial<ApplicationV2.RenderContext>,
-    options: DeepPartial<RenderOptions>,
-  ): void;
+  protected override _onFirstRender(context: DeepPartial<RenderContext>, options: DeepPartial<RenderOptions>): void;
 
   protected override _onClose(options: DeepPartial<RenderOptions>): void;
 
diff --git a/src/foundry/client-esm/applications/api/handlebars-application.d.mts b/src/foundry/client-esm/applications/api/handlebars-application.d.mts
index 323a9ff4c..358b3bae6 100644
--- a/src/foundry/client-esm/applications/api/handlebars-application.d.mts
+++ b/src/foundry/client-esm/applications/api/handlebars-application.d.mts
@@ -1,4 +1,4 @@
-import type { ConstructorOf, DeepPartial, Mixin } from "../../../../types/utils.d.mts";
+import type { AnyObject, ConstructorOf, DeepPartial, Mixin } from "../../../../types/utils.d.mts";
 import type ApplicationV2 from "./application.d.mts";
 
 /**
@@ -15,7 +15,7 @@ declare class HandlebarsApplication<
   >
     ? RenderOptions
     : never,
-  out RenderContext extends Record<string, unknown> = BaseClass extends ConstructorOf<
+  out RenderContext extends AnyObject = BaseClass extends ConstructorOf<
     ApplicationV2.Internal<any, any, infer RenderContext>
   >
     ? RenderContext
diff --git a/src/foundry/client-esm/applications/apps/compendium-art-config.d.mts b/src/foundry/client-esm/applications/apps/compendium-art-config.d.mts
index 54b6084b2..0ffa62f74 100644
--- a/src/foundry/client-esm/applications/apps/compendium-art-config.d.mts
+++ b/src/foundry/client-esm/applications/apps/compendium-art-config.d.mts
@@ -15,10 +15,10 @@ type CompendiumArtConfigParts = ConformRecord<
  * An application for configuring compendium art priorities.
  */
 declare class CompendiumArtConfig<
+  RenderContext extends CompendiumArtConfigRenderContext = CompendiumArtConfigRenderContext,
   Configuration extends ApplicationV2.Configuration = ApplicationV2.Configuration,
   RenderOptions extends ApplicationV2.RenderOptions = ApplicationV2.RenderOptions,
-  RenderContext extends CompendiumArtConfigRenderContext = CompendiumArtConfigRenderContext,
-> extends HandlebarsApplicationMixin(ApplicationV2)<Configuration, RenderOptions, RenderContext> {
+> extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {
   // placeholder private member to help subclassing
   #compendiumArtConfig: true;
 
diff --git a/src/foundry/client-esm/applications/apps/permission-config.d.mts b/src/foundry/client-esm/applications/apps/permission-config.d.mts
index 39228e875..f9f594d47 100644
--- a/src/foundry/client-esm/applications/apps/permission-config.d.mts
+++ b/src/foundry/client-esm/applications/apps/permission-config.d.mts
@@ -13,10 +13,10 @@ type PermissionConfigParts = ConformRecord<PermissionConfig.Parts, HandlebarsApp
  * An application for configuring the permissions which are available to each User role.
  */
 declare class PermissionConfig<
+  RenderContext extends PermissionConfigRenderContext = PermissionConfigRenderContext,
   Configuration extends ApplicationV2.Configuration = ApplicationV2.Configuration,
   RenderOptions extends ApplicationV2.RenderOptions = ApplicationV2.RenderOptions,
-  RenderContext extends PermissionConfigRenderContext = PermissionConfigRenderContext,
-> extends HandlebarsApplicationMixin(ApplicationV2)<Configuration, RenderOptions, RenderContext> {
+> extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {
   // placeholder private member to help subclassing
   #permissionConfig: true;
 
diff --git a/src/foundry/client-esm/applications/dice/roll-resolver.d.mts b/src/foundry/client-esm/applications/dice/roll-resolver.d.mts
index ac5233f38..2b8c02bf7 100644
--- a/src/foundry/client-esm/applications/dice/roll-resolver.d.mts
+++ b/src/foundry/client-esm/applications/dice/roll-resolver.d.mts
@@ -1,4 +1,4 @@
-import type { DeepPartial, InexactPartial } from "../../../../types/utils.d.mts";
+import type { AnyObject, DeepPartial, EmptyObject, InexactPartial } from "../../../../types/utils.d.mts";
 import type ApplicationV2 from "../api/application.d.mts";
 import type HandlebarsApplicationMixin from "../api/handlebars-application.d.mts";
 
@@ -7,10 +7,10 @@ import type HandlebarsApplicationMixin from "../api/handlebars-application.d.mts
  */
 
 declare class RollResolver<
+  RenderContext extends AnyObject = EmptyObject,
   Configuration extends ApplicationV2.Configuration = ApplicationV2.Configuration,
   RenderOptions extends ApplicationV2.RenderOptions = ApplicationV2.RenderOptions,
-  RenderContext extends Record<string, unknown> = Record<string, never>,
-> extends HandlebarsApplicationMixin(ApplicationV2)<Configuration, RenderOptions, RenderContext> {
+> extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {
   constructor(roll: Roll, options?: DeepPartial<Configuration>);
 
   // a placeholder private method to help subclassing
@@ -49,7 +49,7 @@ declare class RollResolver<
    * @returns
    */
   resolveResult(
-    term: DiceTerm,
+    term: foundry.dice.terms.DiceTerm,
     method: string,
     options?: InexactPartial<{
       /** @defaultValue `false` */
@@ -72,7 +72,7 @@ declare class RollResolver<
    * @param term        - The term.
    * @returns  A Promise that resolves when the term's results have been externally fulfilled.
    */
-  addTerm(term: DiceTerm): Promise<void>;
+  addTerm(term: foundry.dice.terms.DiceTerm): Promise<void>;
 
   /**
    * Check if all rolls have been fulfilled.
@@ -89,7 +89,7 @@ declare class RollResolver<
 declare namespace RollResolver {
   interface DiceTermFulfillmentDescriptor {
     id: string;
-    term: DiceTerm;
+    term: foundry.dice.terms.DiceTerm;
     method: string;
     isNew?: boolean | undefined;
   }
diff --git a/src/foundry/client-esm/applications/sheets/actor-sheet.d.mts b/src/foundry/client-esm/applications/sheets/actor-sheet.d.mts
index a7c3392ff..ef8c765bf 100644
--- a/src/foundry/client-esm/applications/sheets/actor-sheet.d.mts
+++ b/src/foundry/client-esm/applications/sheets/actor-sheet.d.mts
@@ -1,6 +1,12 @@
+import type { AnyObject, EmptyObject } from "../../../../types/utils.d.mts";
 import type DocumentSheetV2 from "../api/document-sheet.d.mts";
 
 /**
  * A base class for providing Actor Sheet behavior using ApplicationV2.
  */
-export default class ActorSheetV2 extends DocumentSheetV2<Actor.ConfiguredInstance> {}
+export default class ActorSheetV2<
+  RenderContext extends AnyObject = EmptyObject,
+  Configuration extends
+    DocumentSheetV2.Configuration<Actor.ConfiguredInstance> = DocumentSheetV2.Configuration<Actor.ConfiguredInstance>,
+  RenderOptions extends DocumentSheetV2.RenderOptions = DocumentSheetV2.RenderOptions,
+> extends DocumentSheetV2<Actor.ConfiguredInstance, RenderContext, Configuration, RenderOptions> {}
diff --git a/src/foundry/client-esm/applications/sheets/ambient-light-config.d.mts b/src/foundry/client-esm/applications/sheets/ambient-light-config.d.mts
index 319e765a5..1390b502d 100644
--- a/src/foundry/client-esm/applications/sheets/ambient-light-config.d.mts
+++ b/src/foundry/client-esm/applications/sheets/ambient-light-config.d.mts
@@ -1,3 +1,4 @@
+import type { AnyObject, EmptyObject } from "../../../../types/utils.d.mts";
 import type DocumentSheetV2 from "../api/document-sheet.d.mts";
 import type HandlebarsApplicationMixin from "../api/handlebars-application.d.mts";
 
@@ -5,8 +6,13 @@ import type HandlebarsApplicationMixin from "../api/handlebars-application.d.mts
  * The AmbientLight configuration application.
  */
 export default class AmbientLightConfig<
-  Document extends foundry.abstract.Document<any, any, any>,
-  Configuration extends DocumentSheetV2.Configuration<Document> = DocumentSheetV2.Configuration<Document>,
+  RenderContext extends AnyObject = EmptyObject,
+  Configuration extends
+    DocumentSheetV2.Configuration<AmbientLightDocument.ConfiguredInstance> = DocumentSheetV2.Configuration<AmbientLightDocument.ConfiguredInstance>,
   RenderOptions extends DocumentSheetV2.RenderOptions = DocumentSheetV2.RenderOptions,
-  RenderContext extends Record<string, unknown> = Record<string, never>,
-> extends HandlebarsApplicationMixin(DocumentSheetV2)<Document, Configuration, RenderOptions, RenderContext> {}
+> extends HandlebarsApplicationMixin(DocumentSheetV2)<
+  AmbientLightDocument.ConfiguredInstance,
+  RenderContext,
+  Configuration,
+  RenderOptions
+> {}
diff --git a/src/foundry/client-esm/applications/sheets/ambient-sound-config.d.mts b/src/foundry/client-esm/applications/sheets/ambient-sound-config.d.mts
index d74b2c7cd..391c981d5 100644
--- a/src/foundry/client-esm/applications/sheets/ambient-sound-config.d.mts
+++ b/src/foundry/client-esm/applications/sheets/ambient-sound-config.d.mts
@@ -1,3 +1,4 @@
+import type { AnyObject, EmptyObject } from "../../../../types/utils.d.mts";
 import type DocumentSheetV2 from "../api/document-sheet.d.mts";
 import type HandlebarsApplicationMixin from "../api/handlebars-application.d.mts";
 
@@ -5,8 +6,13 @@ import type HandlebarsApplicationMixin from "../api/handlebars-application.d.mts
  * The AmbientSound configuration application.
  */
 export default class AmbientSoundConfig<
-  Document extends foundry.abstract.Document<any, any, any>,
-  Configuration extends DocumentSheetV2.Configuration<Document> = DocumentSheetV2.Configuration<Document>,
+  RenderContext extends AnyObject = EmptyObject,
+  Configuration extends
+    DocumentSheetV2.Configuration<AmbientSoundDocument.ConfiguredInstance> = DocumentSheetV2.Configuration<AmbientSoundDocument.ConfiguredInstance>,
   RenderOptions extends DocumentSheetV2.RenderOptions = DocumentSheetV2.RenderOptions,
-  RenderContext extends Record<string, unknown> = Record<string, never>,
-> extends HandlebarsApplicationMixin(DocumentSheetV2)<Document, Configuration, RenderOptions, RenderContext> {}
+> extends HandlebarsApplicationMixin(DocumentSheetV2)<
+  AmbientSoundDocument.ConfiguredInstance,
+  RenderContext,
+  Configuration,
+  RenderOptions
+> {}
diff --git a/src/foundry/client-esm/applications/sheets/item-sheet.d.mts b/src/foundry/client-esm/applications/sheets/item-sheet.d.mts
index 83e28d3a6..df69dec0d 100644
--- a/src/foundry/client-esm/applications/sheets/item-sheet.d.mts
+++ b/src/foundry/client-esm/applications/sheets/item-sheet.d.mts
@@ -1,6 +1,12 @@
+import type { AnyObject, EmptyObject } from "../../../../types/utils.d.mts";
 import type DocumentSheetV2 from "../api/document-sheet.d.mts";
 
 /**
  * A base class for providing Item Sheet behavior using ApplicationV2.
  */
-export default class ItemSheetV2 extends DocumentSheetV2<Item.ConfiguredInstance> {}
+export default class ItemSheetV2<
+  RenderContext extends AnyObject = EmptyObject,
+  Configuration extends
+    DocumentSheetV2.Configuration<Item.ConfiguredInstance> = DocumentSheetV2.Configuration<Item.ConfiguredInstance>,
+  RenderOptions extends DocumentSheetV2.RenderOptions = DocumentSheetV2.RenderOptions,
+> extends DocumentSheetV2<Item.ConfiguredInstance, RenderContext, Configuration, RenderOptions> {}
diff --git a/src/foundry/client-esm/applications/sheets/region-behavior-config.d.mts b/src/foundry/client-esm/applications/sheets/region-behavior-config.d.mts
index 33625df63..4dc58f6b6 100644
--- a/src/foundry/client-esm/applications/sheets/region-behavior-config.d.mts
+++ b/src/foundry/client-esm/applications/sheets/region-behavior-config.d.mts
@@ -1,3 +1,4 @@
+import type { AnyObject, EmptyObject } from "../../../../types/utils.d.mts";
 import type DocumentSheetV2 from "../api/document-sheet.d.mts";
 import type HandlebarsApplicationMixin from "../api/handlebars-application.d.mts";
 
@@ -5,8 +6,8 @@ import type HandlebarsApplicationMixin from "../api/handlebars-application.d.mts
  * The Scene Region configuration application.
  */
 export default class RegionBehaviorConfig<
-  Document extends foundry.abstract.Document<any, any, any>,
+  Document extends foundry.abstract.Document.Any,
+  RenderContext extends AnyObject = EmptyObject,
   Configuration extends DocumentSheetV2.Configuration<Document> = DocumentSheetV2.Configuration<Document>,
   RenderOptions extends DocumentSheetV2.RenderOptions = DocumentSheetV2.RenderOptions,
-  RenderContext extends Record<string, unknown> = Record<string, never>,
-> extends HandlebarsApplicationMixin(DocumentSheetV2)<Document, Configuration, RenderOptions, RenderContext> {}
+> extends HandlebarsApplicationMixin(DocumentSheetV2)<Document, RenderContext, Configuration, RenderOptions> {}
diff --git a/src/foundry/client-esm/applications/sheets/region-config.d.mts b/src/foundry/client-esm/applications/sheets/region-config.d.mts
index cf9fcf9dc..5ab9e594a 100644
--- a/src/foundry/client-esm/applications/sheets/region-config.d.mts
+++ b/src/foundry/client-esm/applications/sheets/region-config.d.mts
@@ -1,3 +1,4 @@
+import type { AnyObject, EmptyObject } from "../../../../types/utils.d.mts";
 import type DocumentSheetV2 from "../api/document-sheet.d.mts";
 import type HandlebarsApplicationMixin from "../api/handlebars-application.d.mts";
 
@@ -5,8 +6,8 @@ import type HandlebarsApplicationMixin from "../api/handlebars-application.d.mts
  * The Scene Region configuration application.
  */
 export default class RegionConfig<
-  Document extends foundry.abstract.Document<any, any, any>,
+  Document extends foundry.abstract.Document.Any,
+  RenderContext extends AnyObject = EmptyObject,
   Configuration extends DocumentSheetV2.Configuration<Document> = DocumentSheetV2.Configuration<Document>,
   RenderOptions extends DocumentSheetV2.RenderOptions = DocumentSheetV2.RenderOptions,
-  RenderContext extends Record<string, unknown> = Record<string, never>,
-> extends HandlebarsApplicationMixin(DocumentSheetV2)<Document, Configuration, RenderOptions, RenderContext> {}
+> extends HandlebarsApplicationMixin(DocumentSheetV2)<Document, RenderContext, Configuration, RenderOptions> {}
diff --git a/src/foundry/client-esm/applications/sheets/user-config.d.mts b/src/foundry/client-esm/applications/sheets/user-config.d.mts
index b99aebcd7..c71868954 100644
--- a/src/foundry/client-esm/applications/sheets/user-config.d.mts
+++ b/src/foundry/client-esm/applications/sheets/user-config.d.mts
@@ -1,3 +1,4 @@
+import type { AnyObject, EmptyObject } from "../../../../types/utils.d.mts";
 import type DocumentSheetV2 from "../api/document-sheet.d.mts";
 import type HandlebarsApplicationMixin from "../api/handlebars-application.d.mts";
 
@@ -5,8 +6,13 @@ import type HandlebarsApplicationMixin from "../api/handlebars-application.d.mts
  * The User configuration application.
  */
 export default class UserConfig<
-  Document extends foundry.abstract.Document<any, any, any>,
-  Configuration extends DocumentSheetV2.Configuration<Document> = DocumentSheetV2.Configuration<Document>,
+  RenderContext extends AnyObject = EmptyObject,
+  Configuration extends
+    DocumentSheetV2.Configuration<User.ConfiguredInstance> = DocumentSheetV2.Configuration<User.ConfiguredInstance>,
   RenderOptions extends DocumentSheetV2.RenderOptions = DocumentSheetV2.RenderOptions,
-  RenderContext extends Record<string, unknown> = Record<string, never>,
-> extends HandlebarsApplicationMixin(DocumentSheetV2)<Document, Configuration, RenderOptions, RenderContext> {}
+> extends HandlebarsApplicationMixin(DocumentSheetV2)<
+  User.ConfiguredInstance,
+  RenderContext,
+  Configuration,
+  RenderOptions
+> {}
diff --git a/src/foundry/client-esm/applications/ui/region-legend.d.mts b/src/foundry/client-esm/applications/ui/region-legend.d.mts
index 7e7bb2ed5..1aa017c4c 100644
--- a/src/foundry/client-esm/applications/ui/region-legend.d.mts
+++ b/src/foundry/client-esm/applications/ui/region-legend.d.mts
@@ -1,3 +1,4 @@
+import type { AnyObject, EmptyObject } from "../../../../types/utils.d.mts";
 import type ApplicationV2 from "../api/application.d.mts";
 import type HandlebarsApplicationMixin from "../api/handlebars-application.d.mts";
 
@@ -5,7 +6,7 @@ import type HandlebarsApplicationMixin from "../api/handlebars-application.d.mts
  * Scene Region Legend.
  */
 export default class RegionLegend<
+  RenderContext extends AnyObject = EmptyObject,
   Configuration extends ApplicationV2.Configuration = ApplicationV2.Configuration,
   RenderOptions extends ApplicationV2.RenderOptions = ApplicationV2.RenderOptions,
-  RenderContext extends Record<string, unknown> = Record<string, never>,
-> extends HandlebarsApplicationMixin(ApplicationV2)<Configuration, RenderOptions, RenderContext> {}
+> extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {}
diff --git a/src/foundry/client-esm/canvas/sources/rendered-effect-source.d.mts b/src/foundry/client-esm/canvas/sources/rendered-effect-source.d.mts
index b6b8704f9..a6f8c197b 100644
--- a/src/foundry/client-esm/canvas/sources/rendered-effect-source.d.mts
+++ b/src/foundry/client-esm/canvas/sources/rendered-effect-source.d.mts
@@ -1,4 +1,4 @@
-import type { InexactPartial } from "../../../../types/utils.d.mts";
+import type { AnyFunction, InexactPartial } from "../../../../types/utils.d.mts";
 import type BaseEffectSource from "./base-effect-source.d.mts";
 
 // TODO: Remove after shaders are done
@@ -255,7 +255,7 @@ declare namespace RenderedEffectSource {
      * The animation function that runs every frame
      * @privateRemarks TODO: Figure out if there's a better way to define the function
      */
-    animation?: Function | undefined;
+    animation?: AnyFunction | undefined;
     /**
      * A custom illumination shader used by this animation
      */
diff --git a/src/foundry/client-esm/client.d.mts b/src/foundry/client-esm/client.d.mts
index 51c74ad53..ea5fa4147 100644
--- a/src/foundry/client-esm/client.d.mts
+++ b/src/foundry/client-esm/client.d.mts
@@ -21,6 +21,7 @@ import * as _canvas from "./canvas/_module.mjs";
 import * as _helpers from "./helpers/_module.mjs";
 import * as _data from "./data/_module.mjs";
 import * as _dice from "./dice/_module.mjs";
+import type { AnyObject } from "../../types/utils.d.mts";
 
 /**
  * Constant definitions used throughout the Foundry Virtual Tabletop framework.
@@ -184,6 +185,9 @@ declare global {
   type Collection<T> = _utils.Collection<T>;
   var Collection: typeof _utils.Collection; // eslint-disable-line no-var
 
+  type Roll<D extends Record<string, unknown> = AnyObject> = _dice.Roll<D>;
+  var Roll: typeof _dice.Roll; // eslint-disable-line no-var
+
   // Deprecated global namespace dump; done programmatically by fvtt
   type Semaphore = _utils.Semaphore;
   /** @deprecated since v12 will be removed in v14 */
diff --git a/src/foundry/client-esm/dice/_module.d.mts b/src/foundry/client-esm/dice/_module.d.mts
index 210d1b1eb..ae57944ff 100644
--- a/src/foundry/client-esm/dice/_module.d.mts
+++ b/src/foundry/client-esm/dice/_module.d.mts
@@ -8,6 +8,6 @@ export * as types from "./_types.mjs";
 export * as terms from "./terms/_module.mjs";
 
 export { default as Roll } from "./roll.mjs";
-export { default as RollGrammar } from "./grammar.pegjs";
+// export { default as RollGrammar } from "./grammar.pegjs"; // TODO: Figure out if there's a good way to statically type the PEGGY grammar
 export { default as RollParser } from "./parser.mjs";
 export { default as MersenneTwister } from "./twister.mjs";
diff --git a/src/foundry/client-esm/dice/roll.d.mts b/src/foundry/client-esm/dice/roll.d.mts
index 148a7d656..57560ce76 100644
--- a/src/foundry/client-esm/dice/roll.d.mts
+++ b/src/foundry/client-esm/dice/roll.d.mts
@@ -1,5 +1,4 @@
-import type { ConfiguredDocumentClass } from "../../../types/helperTypes.d.mts";
-import type { ConstructorOf, DeepPartial, EmptyObject, InexactPartial } from "../../../types/utils.d.mts";
+import type { AnyObject, ConstructorOf, EmptyObject, InexactPartial } from "../../../types/utils.d.mts";
 
 import type { RollParseNode } from "./_types.d.mts";
 import type DiceTerm from "./terms/dice.d.mts";
@@ -30,7 +29,7 @@ import type RollResolver from "../applications/dice/roll-resolver.d.mts";
  * console.log(r.total);    // 22
  * ```
  */
-declare class Roll<D extends Record<string, unknown> = {}> {
+declare class Roll<D extends AnyObject = AnyObject> {
   /**
    * @param formula - The string formula to parse
    * @param data    - The data object against which to parse attributes within the formula
@@ -191,7 +190,7 @@ declare class Roll<D extends Record<string, unknown> = {}> {
     allowStrings,
     allowInteractive,
     ...options
-  }?: InexactPartial<Roll.Options>): Roll.Evaluated<this> | Promise<Roll.Evaluated<this>>;
+  }?: InexactPartial<Roll.Options>): Promise<Roll.Evaluated<this>>;
 
   /* -------------------------------------------- */
 
@@ -259,7 +258,7 @@ declare class Roll<D extends Record<string, unknown> = {}> {
    * @see Roll#evaluate
    * @param options - Options passed to Roll#evaluate.
    */
-  roll(options?: InexactPartial<Roll.Options>): Roll.Evaluated<this> | Promise<Roll.Evaluated<this>>;
+  roll(options?: InexactPartial<Roll.Options>): Promise<Roll.Evaluated<this>>;
 
   /* -------------------------------------------- */
 
@@ -269,7 +268,7 @@ declare class Roll<D extends Record<string, unknown> = {}> {
    * @param options - Evaluation options passed to Roll#evaluate
    * @returns A new Roll object, rolled using the same formula and data
    */
-  reroll(options?: InexactPartial<Roll.Options>): Roll.Evaluated<this> | Promise<Roll.Evaluated<this>>;
+  reroll(options?: InexactPartial<Roll.Options>): Promise<Roll.Evaluated<this>>;
 
   /* -------------------------------------------- */
 
@@ -304,7 +303,7 @@ declare class Roll<D extends Record<string, unknown> = {}> {
    * @param options - Additional options which modify or describe this Roll
    * @returns The constructed Roll instance
    */
-  static create<D extends Record<string, unknown> = {}>(
+  static create<D extends AnyObject = AnyObject>(
     formula: string,
     data?: D,
     options?: InexactPartial<Roll.Options>,
@@ -491,20 +490,24 @@ declare class Roll<D extends Record<string, unknown> = {}> {
    * @returns A promise which resolves to the created ChatMessage entity, if create is true
    *          or the Object of prepared chatData otherwise.
    */
-  toMessage<T extends DeepPartial<ConstructorParameters<ConfiguredDocumentClass<typeof ChatMessage>>[0]> = EmptyObject>(
+  toMessage<T extends foundry.documents.BaseChatMessage.ConstructorData = EmptyObject, Create extends boolean = true>(
     messageData?: T,
-    { rollMode, create }?: InexactPartial<{ rollMode: keyof CONFIG.Dice.RollModes | "roll"; create: true }>,
-  ): Promise<ChatMessage.ConfiguredInstance | undefined>;
-
-  toMessage<T extends DeepPartial<ConstructorParameters<ConfiguredDocumentClass<typeof ChatMessage>>[0]> = EmptyObject>(
-    messageData: T,
-    { rollMode, create }: { rollMode?: keyof CONFIG.Dice.RollModes | "roll" | undefined; create: false },
-  ): Roll.MessageData<T>;
-
-  toMessage<T extends DeepPartial<ConstructorParameters<ConfiguredDocumentClass<typeof ChatMessage>>[0]> = EmptyObject>(
-    messageData: T,
-    { rollMode, create }: { rollMode?: keyof CONFIG.Dice.RollModes | "roll" | undefined; create: boolean },
-  ): Promise<ChatMessage.ConfiguredInstance | undefined> | Roll.MessageData<T>;
+    options?: InexactPartial<{
+      /**
+       * The template roll mode to use for the message from CONFIG.Dice.rollModes
+       * @remarks "roll" equivalent to explicit undefined
+       */
+      rollMode: keyof CONFIG.Dice.RollModes | "roll";
+      /**
+       * Whether to automatically create the chat message, or only return the prepared chatData object.
+       * @defaultValue `true`
+       */
+      create: Create;
+    }>,
+  ): Promise<
+    | (true extends Create ? ChatMessage.ConfiguredInstance | undefined : never)
+    | (false extends Create ? Roll.MessageData<T> : never)
+  >;
 
   /* -------------------------------------------- */
   /*  Interface Helpers                           */
@@ -629,9 +632,9 @@ declare namespace Roll {
     total: number | null;
   }
 
-  type MessageData<T extends DeepPartial<ConstructorParameters<typeof ChatMessage>[0]>> = T & {
+  type MessageData<T extends foundry.documents.BaseChatMessage.ConstructorData> = T & {
     user: string;
-    type: (typeof foundry.CONST.CHAT_MESSAGE_TYPES)["ROLL"]; // TODO: Update this when chat messages are implemented for v12
+    rolls: Roll[];
     content: number;
     sound: typeof CONFIG.sounds.dice;
   };
diff --git a/src/foundry/client-esm/dice/terms/dice.d.mts b/src/foundry/client-esm/dice/terms/dice.d.mts
index 6f8ef2348..dc76401b9 100644
--- a/src/foundry/client-esm/dice/terms/dice.d.mts
+++ b/src/foundry/client-esm/dice/terms/dice.d.mts
@@ -334,6 +334,7 @@ declare namespace DiceTerm {
     options: DiceTerm.Options;
   }
 
+  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
   interface Options extends RollTerm.Options {}
 
   interface Result {
@@ -374,7 +375,7 @@ declare namespace DiceTerm {
     strict: boolean;
   }
 
-  // eslint-disable-next-line @typescript-eslint/no-empty-interface
+  // eslint-disable-next-line @typescript-eslint/no-empty-object-type, @typescript-eslint/no-empty-interface
   interface Modifiers {}
 }
 
diff --git a/src/foundry/client-esm/dice/terms/function.d.mts b/src/foundry/client-esm/dice/terms/function.d.mts
index f8b67d905..da277dcaa 100644
--- a/src/foundry/client-esm/dice/terms/function.d.mts
+++ b/src/foundry/client-esm/dice/terms/function.d.mts
@@ -98,6 +98,7 @@ declare namespace FunctionTerm {
     options?: InexactPartial<FunctionTerm.Options>;
   }
 
+  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
   interface Options extends RollTerm.Options {}
 }
 
diff --git a/src/foundry/client-esm/dice/terms/pool.d.mts b/src/foundry/client-esm/dice/terms/pool.d.mts
index e1f985f95..fd1761beb 100644
--- a/src/foundry/client-esm/dice/terms/pool.d.mts
+++ b/src/foundry/client-esm/dice/terms/pool.d.mts
@@ -243,6 +243,7 @@ declare namespace PoolTerm {
     cf: "countFailures";
   }
 
+  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
   interface TermData extends Required<PoolTermConstructorData> {}
 
   interface PoolTermConstructorData {
diff --git a/src/foundry/client/apps/forms/adventure-exporter.d.mts b/src/foundry/client/apps/forms/adventure-exporter.d.mts
index a2dee6db6..bf5fe7f5e 100644
--- a/src/foundry/client/apps/forms/adventure-exporter.d.mts
+++ b/src/foundry/client/apps/forms/adventure-exporter.d.mts
@@ -75,6 +75,7 @@ declare global {
   }
 
   namespace AdventureExporter {
+    // eslint-disable-next-line @typescript-eslint/no-empty-object-type
     interface Options extends DocumentSheetOptions<Adventure.ConfiguredInstance> {}
 
     interface AdventureContentTreeNode {
diff --git a/src/foundry/client/apps/forms/adventure-importer.d.mts b/src/foundry/client/apps/forms/adventure-importer.d.mts
index de79d2378..ba8f4df03 100644
--- a/src/foundry/client/apps/forms/adventure-importer.d.mts
+++ b/src/foundry/client/apps/forms/adventure-importer.d.mts
@@ -72,6 +72,7 @@ declare global {
   }
 
   namespace AdventureImporter {
+    // eslint-disable-next-line @typescript-eslint/no-empty-object-type
     interface Options extends DocumentSheetOptions<Adventure.ConfiguredInstance> {}
 
     interface AdventureImporterData {
diff --git a/src/foundry/client/apps/forms/base-sheet.d.mts b/src/foundry/client/apps/forms/base-sheet.d.mts
index 6c2a9a14b..6bb8ff019 100644
--- a/src/foundry/client/apps/forms/base-sheet.d.mts
+++ b/src/foundry/client/apps/forms/base-sheet.d.mts
@@ -33,6 +33,7 @@ declare global {
   }
 
   namespace BaseSheet {
+    // eslint-disable-next-line @typescript-eslint/no-empty-object-type
     interface Options extends DocumentSheetOptions<Adventure.ConfiguredInstance> {}
 
     interface BaseSheetData extends DocumentSheet.DocumentSheetData<Options, foundry.abstract.Document.Any> {
diff --git a/src/foundry/client/apps/forms/default-sheets-config.d.mts b/src/foundry/client/apps/forms/default-sheets-config.d.mts
index b29950113..6c0be7568 100644
--- a/src/foundry/client/apps/forms/default-sheets-config.d.mts
+++ b/src/foundry/client/apps/forms/default-sheets-config.d.mts
@@ -25,6 +25,7 @@ declare global {
   }
 
   namespace DefaultSheetsConfig {
+    // eslint-disable-next-line @typescript-eslint/no-empty-object-type
     interface Options extends PackageConfiguration.Options {}
 
     interface CategorySubType {
@@ -39,6 +40,7 @@ declare global {
       subtypes: CategorySubType[];
     }
 
+    // eslint-disable-next-line @typescript-eslint/no-empty-object-type
     interface CategoryData extends PackageConfiguration.CategoryData<Category> {}
   }
 }
diff --git a/src/foundry/client/apps/forms/fonts.d.mts b/src/foundry/client/apps/forms/fonts.d.mts
index bd58b5d95..fd099d1bf 100644
--- a/src/foundry/client/apps/forms/fonts.d.mts
+++ b/src/foundry/client/apps/forms/fonts.d.mts
@@ -156,6 +156,7 @@ declare global {
   }
 
   namespace FontConfig {
+    // eslint-disable-next-line @typescript-eslint/no-empty-object-type
     interface Options extends FormApplicationOptions {}
 
     interface FontConfigData {
diff --git a/src/foundry/client/apps/forms/journal-page-sheet.d.mts b/src/foundry/client/apps/forms/journal-page-sheet.d.mts
index 8b01863e2..89d9cf190 100644
--- a/src/foundry/client/apps/forms/journal-page-sheet.d.mts
+++ b/src/foundry/client/apps/forms/journal-page-sheet.d.mts
@@ -66,6 +66,7 @@ declare global {
   }
 
   namespace JournalPageSheet {
+    // eslint-disable-next-line @typescript-eslint/no-empty-object-type
     interface Options extends DocumentSheetOptions<JournalEntryPage.ConfiguredInstance> {}
 
     interface JournalPageSheetData
@@ -308,6 +309,7 @@ declare global {
   }
 
   namespace JournalTextTinyMCESheet {
+    // eslint-disable-next-line @typescript-eslint/no-empty-object-type
     interface MCEData extends JournalTextPageSheet.TextData {}
   }
 }
diff --git a/src/foundry/client/apps/sidebar/apps/keybindings-config.d.mts b/src/foundry/client/apps/sidebar/apps/keybindings-config.d.mts
index 388484d3a..a1bb21ce9 100644
--- a/src/foundry/client/apps/sidebar/apps/keybindings-config.d.mts
+++ b/src/foundry/client/apps/sidebar/apps/keybindings-config.d.mts
@@ -149,6 +149,7 @@ declare global {
       count: number;
     }
 
+    // eslint-disable-next-line @typescript-eslint/no-empty-object-type
     interface CategoryData extends PackageConfiguration.CategoryData<Category> {}
 
     interface ActionData extends KeybindingActionConfig {
diff --git a/src/foundry/client/apps/sidebar/apps/tours-management.d.mts b/src/foundry/client/apps/sidebar/apps/tours-management.d.mts
index d78b43810..f8fde6670 100644
--- a/src/foundry/client/apps/sidebar/apps/tours-management.d.mts
+++ b/src/foundry/client/apps/sidebar/apps/tours-management.d.mts
@@ -49,6 +49,7 @@ declare global {
       count: number;
     }
 
+    // eslint-disable-next-line @typescript-eslint/no-empty-object-type
     interface TourCategoryData extends PackageConfiguration.CategoryData<Category> {}
   }
 }
diff --git a/src/foundry/client/apps/templates.d.mts b/src/foundry/client/apps/templates.d.mts
index 39f033fa3..540bd978d 100644
--- a/src/foundry/client/apps/templates.d.mts
+++ b/src/foundry/client/apps/templates.d.mts
@@ -505,6 +505,7 @@ declare global {
       step?: number;
     }
 
+    // eslint-disable-next-line @typescript-eslint/no-empty-object-type
     interface SelectOptions extends Handlebars.HelperOptions {}
 
     interface SelectOptionsOptions extends Partial<Handlebars.HelperOptions> {
diff --git a/src/foundry/client/av/settings.d.mts b/src/foundry/client/av/settings.d.mts
index d625489a7..b053b0aa6 100644
--- a/src/foundry/client/av/settings.d.mts
+++ b/src/foundry/client/av/settings.d.mts
@@ -279,7 +279,7 @@ declare global {
       client: ClientSettings;
       world: WorldSettings;
     }
-    // eslint-disable-next-line @typescript-eslint/no-empty-interface
+    // eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-empty-object-type
     interface Overrides {}
     interface DefaultVoiceModes {
       ALWAYS: "always";
diff --git a/src/foundry/client/config.d.mts b/src/foundry/client/config.d.mts
index 86f11a777..645b2052c 100644
--- a/src/foundry/client/config.d.mts
+++ b/src/foundry/client/config.d.mts
@@ -336,7 +336,7 @@ declare global {
        * The Dice types which are supported.
        * @defaultValue `[Die, FateDie]`
        */
-      types: Array<ConstructorOf<foundry.dice.terms.DiceTerm>>;
+      types: Array<typeof foundry.dice.terms.DiceTerm>;
 
       rollModes: CONFIG.Dice.RollModes;
 
@@ -344,7 +344,7 @@ declare global {
        * Configured Roll class definitions
        * @defaultValue `[Roll]`
        */
-      rolls: Array<ConstructorOf<foundry.dice.Roll>>;
+      rolls: Array<typeof foundry.dice.Roll>;
 
       /**
        * Configured DiceTerm class definitions
@@ -361,14 +361,14 @@ declare global {
        * }
        * ```
        */
-      termTypes: Record<string, ConstructorOf<foundry.dice.terms.RollTerm>>;
+      termTypes: Record<string, typeof foundry.dice.terms.RollTerm>;
 
       /** Configured roll terms and the classes they map to. */
       terms: {
         c: typeof foundry.dice.terms.Coin;
         d: typeof foundry.dice.terms.Die;
         f: typeof foundry.dice.terms.FateDie;
-      } & Record<string, ConstructorOf<foundry.dice.terms.DiceTerm>>;
+      } & Record<string, typeof foundry.dice.terms.DiceTerm>;
 
       /**
        * A function used to provide random uniform values.
@@ -381,7 +381,7 @@ declare global {
 
       /** A collection of custom functions that can be included in roll expressions.*/
       functions: Record<string, RollFunction>;
-    } & Record<string, ConstructorOf<foundry.dice.Roll>>; // Common pattern
+    } & Record<string, typeof foundry.dice.Roll>; // Common pattern
 
     /**
      * Configuration for the FogExploration document
@@ -2741,7 +2741,7 @@ declare global {
     }
 
     // The point of this interface is to be declaration merged into so you can override `DefaultSpecialStatusEffects` and remove existing keys. It's never used when empty.
-    // eslint-disable-next-line @typescript-eslint/no-empty-interface
+    // eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-empty-object-type
     interface SpecialStatusEffects {}
 
     interface DefaultSpecialStatusEffects {
@@ -2796,7 +2796,7 @@ declare global {
       unlock: string;
     }
     namespace Dice {
-      // eslint-disable-next-line @typescript-eslint/no-empty-interface
+      // eslint-disable-next-line @typescript-eslint/no-empty-object-type
       interface RollModes extends Record<foundry.CONST.DICE_ROLL_MODES, string> {}
     }
   }
diff --git a/src/foundry/client/core/hooks.d.mts b/src/foundry/client/core/hooks.d.mts
index 0c81c8250..facda816c 100644
--- a/src/foundry/client/core/hooks.d.mts
+++ b/src/foundry/client/core/hooks.d.mts
@@ -1,3 +1,5 @@
+import type { AnyFunction } from "../../../types/utils.d.mts";
+
 export {};
 
 declare global {
@@ -123,7 +125,7 @@ declare global {
     interface HookedFunction {
       hook: string;
       id: number;
-      fn: Function;
+      fn: AnyFunction;
       once: boolean;
     }
   }
diff --git a/src/foundry/client/core/issues.d.mts b/src/foundry/client/core/issues.d.mts
index cd051a000..9d85e2623 100644
--- a/src/foundry/client/core/issues.d.mts
+++ b/src/foundry/client/core/issues.d.mts
@@ -6,6 +6,7 @@ declare global {
   /**
    * An object structure of document types at the top level, with a count of different sub-types for that document type.
    */
+  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
   interface ModuleSubTypeCounts extends Record<DocumentType, Record<string, number>> {}
 
   /**
diff --git a/src/foundry/client/core/settings.d.mts b/src/foundry/client/core/settings.d.mts
index ddc2c2025..f82808bb2 100644
--- a/src/foundry/client/core/settings.d.mts
+++ b/src/foundry/client/core/settings.d.mts
@@ -1,5 +1,5 @@
 import type { DocumentSubTypes, DocumentType } from "../../../types/helperTypes.d.mts";
-import type { DeepPartial, InexactPartial } from "../../../types/utils.d.mts";
+import type { DeepPartial, EmptyObject, InexactPartial } from "../../../types/utils.d.mts";
 
 declare global {
   /**
@@ -172,10 +172,10 @@ declare global {
       "core.animateRollTable": boolean;
       "core.chatBubbles": boolean;
       "core.chatBubblesPan": boolean;
-      "core.combatTrackerConfig": { resource: string; skipDefeated: boolean } | {};
+      "core.combatTrackerConfig": { resource: string; skipDefeated: boolean } | EmptyObject;
       "core.compendiumConfiguration": Partial<Record<string, CompendiumCollection.Configuration>>;
       "core.coneTemplateType": "round" | "flat";
-      "core.defaultDrawingConfig": foundry.documents.BaseDrawing["_source"] | {};
+      "core.defaultDrawingConfig": foundry.documents.BaseDrawing["_source"] | EmptyObject;
       "core.defaultToken": DeepPartial<foundry.documents.BaseToken>;
       "core.disableResolutionScaling": boolean;
       "core.fontSize": number;
diff --git a/src/foundry/client/core/workers.d.mts b/src/foundry/client/core/workers.d.mts
index 922ea34e8..eaed27ed8 100644
--- a/src/foundry/client/core/workers.d.mts
+++ b/src/foundry/client/core/workers.d.mts
@@ -47,6 +47,7 @@ declare global {
      * @param functionRef  - A reference to the function that should be loaded
      * @returns A Promise which resolves once the Worker has loaded the function.
      */
+    // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
     loadFunction(functionName: string, functionRef: Function): Promise<unknown>;
 
     /**
diff --git a/src/foundry/client/data/collections/compendium-collection.d.mts b/src/foundry/client/data/collections/compendium-collection.d.mts
index 7a071120a..3bf709b87 100644
--- a/src/foundry/client/data/collections/compendium-collection.d.mts
+++ b/src/foundry/client/data/collections/compendium-collection.d.mts
@@ -1,5 +1,5 @@
 import type { ConfiguredDocumentClassForName } from "../../../../types/helperTypes.d.mts";
-import type { DeepPartial, InexactPartial, StoredDocument } from "../../../../types/utils.d.mts";
+import type { DeepPartial, EmptyObject, InexactPartial, StoredDocument } from "../../../../types/utils.d.mts";
 import type { DocumentModificationOptions } from "../../../common/abstract/document.d.mts";
 import type { DirectoryCollectionMixin_DocumentCollection_Interface } from "../abstract/directory-collection-mixin.d.mts";
 
@@ -117,7 +117,7 @@ declare global {
     static _sortStandard(a: number, b: number): number;
 
     /** Access the compendium configuration data for this pack */
-    get config(): CompendiumCollection.Configuration | {};
+    get config(): CompendiumCollection.Configuration | EmptyObject;
 
     get documentName(): this["metadata"]["type"];
 
diff --git a/src/foundry/client/dice/dice/coin.d.mts b/src/foundry/client/dice/dice/coin.d.mts
deleted file mode 100644
index e3df77dce..000000000
--- a/src/foundry/client/dice/dice/coin.d.mts
+++ /dev/null
@@ -1,55 +0,0 @@
-import type { InexactPartial } from "../../../../types/utils.d.mts";
-
-export {};
-
-declare global {
-  /**
-   * A type of DiceTerm used to represent flipping a two-sided coin.
-   */
-  class Coin extends DiceTerm {
-    constructor(termData?: InexactPartial<Coin.TermData>);
-
-    faces: 2;
-
-    /**
-     * @defaultValue `c`
-     */
-    static DENOMINATION: string;
-
-    /**
-     * @defaultValue
-     * ```typescript
-     *  {
-     *    c: "call"
-     *  }
-     * ```
-     */
-    static MODIFIERS: Coin.Modifiers;
-
-    override roll(options?: { maximize: boolean; minimize: boolean }): DiceTerm.Result;
-
-    override getResultLabel(result: DiceTerm.Result): string;
-
-    override getResultCSS(result: DiceTerm.Result): (string | null)[];
-
-    /**
-     * Call the result of the coin flip, marking any coins that matched the called target as a success
-     *
-     * 3dcc1      Flip 3 coins and treat "heads" as successes
-     * 2dcc0      Flip 2 coins and treat "tails" as successes
-     *
-     * @param modifier - The matched modifier query
-     */
-    call(modifier: string): string;
-  }
-
-  namespace Coin {
-    interface TermData extends DiceTerm.TermData {
-      modifiers: Array<keyof Modifiers>;
-    }
-
-    interface Modifiers {
-      c: "call";
-    }
-  }
-}
diff --git a/src/foundry/client/dice/dice/die.d.mts b/src/foundry/client/dice/dice/die.d.mts
deleted file mode 100644
index 9bdabaf0f..000000000
--- a/src/foundry/client/dice/dice/die.d.mts
+++ /dev/null
@@ -1,233 +0,0 @@
-export {};
-
-declare global {
-  /**
-   * A type of DiceTerm used to represent rolling a fair n-sided die.
-   *
-   * @example Roll 4 six-sided dice
-   * ```typescript
-   * let die = new Die({faces: 6, number: 4}).evaluate();
-   * ```
-   */
-  class Die extends DiceTerm {
-    constructor(termData?: Partial<Die.TermData>);
-
-    /**
-     * @defaultValue `"d"`
-     */
-    static override DENOMINATION: string;
-
-    /**
-     * @defaultValue
-     * ```typescript
-     * {
-     *   r: "reroll";
-     *   rr: "rerollRecursive";
-     *   x: "explode";
-     *   xo: "explodeOnce";
-     *   k: "keep";
-     *   kh: "keep";
-     *   kl: "keep";
-     *   d: "drop";
-     *   dh: "drop";
-     *   dl: "drop";
-     *   min: "minimum";
-     *   max: "maximum";
-     *   even: "countEven";
-     *   odd: "countOdd";
-     *   cs: "countSuccess";
-     *   cf: "countFailures";
-     *   df: "deductFailures";
-     *   sf: "subtractFailures";
-     *   ms: "marginSuccess";
-     * }
-     * ```
-     */
-    static override MODIFIERS: Die.Modifiers;
-
-    override get total(): number | null;
-
-    /**
-     * Re-roll the Die, rolling additional results for any values which fall within a target set.
-     * If no target number is specified, re-roll the lowest possible result.
-     *
-     * 20d20r         reroll all 1s
-     * 20d20r1        reroll all 1s
-     * 20d20r=1       reroll all 1s
-     * 20d20r1=1      reroll a single 1
-     *
-     * @param modifier - The matched modifier query
-     * @param recursive - Reroll recursively, continuing to reroll until the condition is no longer met
-     * @returns False if the modifier was unmatched
-     */
-    reroll(modifier: string, { recursive }?: { recursive?: boolean }): boolean | void;
-
-    /**
-     * @see {@link Die#reroll}
-     */
-    rerollRecursive(modifier: string): boolean | void;
-
-    /**
-     * Explode the Die, rolling additional results for any values which match the target set.
-     * If no target number is specified, explode the highest possible result.
-     * Explosion can be a "small explode" using a lower-case x or a "big explode" using an upper-case "X"
-     *
-     * @param modifier  - The matched modifier query
-     * @param recursive - Explode recursively, such that new rolls can also explode?
-     *                    (default: `true`)
-     */
-    explode(modifier: string, { recursive }?: { recursive: boolean }): boolean | void;
-
-    /**
-     * @see {@link Die#explode}
-     */
-    explodeOnce(modifier: string): boolean | void;
-
-    /**
-     * Keep a certain number of highest or lowest dice rolls from the result set.
-     *
-     * 20d20k       Keep the 1 highest die
-     * 20d20kh      Keep the 1 highest die
-     * 20d20kh10    Keep the 10 highest die
-     * 20d20kl      Keep the 1 lowest die
-     * 20d20kl10    Keep the 10 lowest die
-     *
-     * @param modifier - The matched modifier query
-     */
-    keep(modifier: string): boolean | void;
-
-    /**
-     * Drop a certain number of highest or lowest dice rolls from the result set.
-     *
-     * 20d20d       Drop the 1 lowest die
-     * 20d20dh      Drop the 1 highest die
-     * 20d20dl      Drop the 1 lowest die
-     * 20d20dh10    Drop the 10 highest die
-     * 20d20dl10    Drop the 10 lowest die
-     *
-     * @param modifier - The matched modifier query
-     */
-    drop(modifier: string): boolean | void;
-
-    /**
-     * Count the number of successful results which occurred in a given result set.
-     * Successes are counted relative to some target, or relative to the maximum possible value if no target is given.
-     * Applying a count-success modifier to the results re-casts all results to 1 (success) or 0 (failure)
-     *
-     * 20d20cs      Count the number of dice which rolled a 20
-     * 20d20cs\>10   Count the number of dice which rolled higher than 10
-     * 20d20cs\<10   Count the number of dice which rolled less than 10
-     *
-     * @param modifier - The matched modifier query
-     */
-    countSuccess(modifier: string): boolean | void;
-
-    /**
-     * Count the number of failed results which occurred in a given result set.
-     * Failures are counted relative to some target, or relative to the lowest possible value if no target is given.
-     * Applying a count-failures modifier to the results re-casts all results to 1 (failure) or 0 (non-failure)
-     *
-     * 6d6cf      Count the number of dice which rolled a 1 as failures
-     * 6d6cf\<=3   Count the number of dice which rolled less than 3 as failures
-     * 6d6cf\>4    Count the number of dice which rolled greater than 4 as failures
-     *
-     * @param modifier - The matched modifier query
-     */
-    countFailures(modifier: string): boolean | void;
-
-    /**
-     * Count the number of even results which occurred in a given result set.
-     * Even numbers are marked as a success and counted as 1
-     * Odd numbers are marked as a non-success and counted as 0.
-     *
-     * 6d6even    Count the number of even numbers rolled
-     *
-     * @param modifier - The matched modifier query
-     */
-    countEven(modifier: string): boolean | void;
-
-    /**
-     * Count the number of odd results which occurred in a given result set.
-     * Odd numbers are marked as a success and counted as 1
-     * Even numbers are marked as a non-success and counted as 0.
-     *
-     * 6d6odd    Count the number of odd numbers rolled
-     *
-     * @param modifier - The matched modifier query
-     */
-    countOdd(modifier: string): boolean | void;
-
-    /**
-     * Deduct the number of failures from the dice result, counting each failure as -1
-     * Failures are identified relative to some target, or relative to the lowest possible value if no target is given.
-     * Applying a deduct-failures modifier to the results counts all failed results as -1.
-     *
-     * 6d6df      Subtract the number of dice which rolled a 1 from the non-failed total.
-     * 6d6cs\>3df  Subtract the number of dice which rolled a 3 or less from the non-failed count.
-     * 6d6cf\<3df  Subtract the number of dice which rolled less than 3 from the non-failed count.
-     *
-     * @param modifier - The matched modifier query
-     */
-    deductFailures(modifier: string): boolean | void;
-
-    /**
-     * Subtract the value of failed dice from the non-failed total, where each failure counts as its negative value.
-     * Failures are identified relative to some target, or relative to the lowest possible value if no target is given.
-     * Applying a deduct-failures modifier to the results counts all failed results as -1.
-     *
-     * 6d6df\<3    Subtract the value of results which rolled less than 3 from the non-failed total.
-     *
-     * @param modifier - The matched modifier query
-     */
-    subtractFailures(modifier: string): boolean | void;
-
-    /**
-     * Subtract the total value of the DiceTerm from a target value, treating the difference as the final total.
-     * Example: 6d6ms\>12    Roll 6d6 and subtract 12 from the resulting total.
-     * @param modifier - The matched modifier query
-     */
-    marginSuccess(modifier: string): boolean | void;
-
-    /**
-     * Constrain each rolled result to be at least some minimum value.
-     * Example: 6d6min2    Roll 6d6, each result must be at least 2
-     * @param modifier - The matched modifier query
-     */
-    minimum(modifier: string): boolean | void;
-
-    /**
-     * Constrain each rolled result to be at most some maximum value.
-     * Example: 6d6max5    Roll 6d6, each result must be at most 5
-     * @param modifier - The matched modifier query
-     */
-    maximum(modifier: string): boolean | void;
-  }
-
-  namespace Die {
-    interface TermData extends DiceTerm.TermData {
-      modifiers: Array<keyof (typeof Die)["MODIFIERS"]>;
-    }
-
-    interface Modifiers {
-      r: "reroll";
-      rr: "rerollRecursive";
-      x: "explode";
-      xo: "explodeOnce";
-      k: "keep";
-      kh: "keep";
-      kl: "keep";
-      d: "drop";
-      dh: "drop";
-      dl: "drop";
-      min: "minimum";
-      max: "maximum";
-      even: "countEven";
-      odd: "countOdd";
-      cs: "countSuccess";
-      cf: "countFailures";
-      df: "deductFailures";
-      sf: "subtractFailures";
-      ms: "marginSuccess";
-    }
-  }
-}
diff --git a/src/foundry/client/dice/dice/fate.d.mts b/src/foundry/client/dice/dice/fate.d.mts
deleted file mode 100644
index 3ff9682df..000000000
--- a/src/foundry/client/dice/dice/fate.d.mts
+++ /dev/null
@@ -1,41 +0,0 @@
-export {};
-
-declare global {
-  /**
-   * A type of DiceTerm used to represent a three-sided Fate/Fudge die.
-   * Mathematically behaves like 1d3-2
-   */
-  class FateDie extends DiceTerm {
-    constructor(termData?: Partial<FateDie.TermData>);
-
-    faces: 3;
-
-    /**
-     * @defaultValue `"f"`
-     */
-    static DENOMINATION: string;
-
-    static override MODIFIERS: FateDie.Modifiers;
-
-    override roll({ minimize, maximize }?: { minimize: boolean; maximize: boolean }): DiceTerm.Result;
-
-    override getResultLabel(result: DiceTerm.Result): string;
-  }
-
-  namespace FateDie {
-    interface TermData extends DiceTerm.TermData {
-      modifiers: Array<keyof (typeof FateDie)["MODIFIERS"]>;
-    }
-
-    interface Modifiers {
-      r: Die["reroll"];
-      rr: Die["rerollRecursive"];
-      k: Die["keep"];
-      kh: Die["keep"];
-      kl: Die["keep"];
-      d: Die["drop"];
-      dh: Die["drop"];
-      dl: Die["drop"];
-    }
-  }
-}
diff --git a/src/foundry/client/dice/dice/index.d.mts b/src/foundry/client/dice/dice/index.d.mts
deleted file mode 100644
index 4f45f9afd..000000000
--- a/src/foundry/client/dice/dice/index.d.mts
+++ /dev/null
@@ -1,3 +0,0 @@
-import "./coin.d.mts";
-import "./die.d.mts";
-import "./fate.d.mts";
diff --git a/src/foundry/client/dice/index.d.mts b/src/foundry/client/dice/index.d.mts
deleted file mode 100644
index b29ea621e..000000000
--- a/src/foundry/client/dice/index.d.mts
+++ /dev/null
@@ -1,5 +0,0 @@
-import "./dice/index.d.mts";
-import "./roll.d.mts";
-import "./term.d.mts";
-import "./terms/index.d.mts";
-import "./twister.d.mts";
diff --git a/src/foundry/client/dice/roll.d.mts b/src/foundry/client/dice/roll.d.mts
deleted file mode 100644
index ff7119c58..000000000
--- a/src/foundry/client/dice/roll.d.mts
+++ /dev/null
@@ -1,556 +0,0 @@
-import type { ConfiguredDocumentClass } from "../../../types/helperTypes.d.mts";
-import type { ConstructorOf, DeepPartial, InexactPartial } from "../../../types/utils.d.mts";
-
-declare global {
-  /**
-   * An interface and API for constructing and evaluating dice rolls.
-   * The basic structure for a dice roll is a string formula and an object of data against which to parse it.
-   *
-   * @typeParam D - the type of data object against which to parse attributes within the formula
-   *
-   * @example Attack with advantage!
-   * ```typescript
-   * let r = new Roll("2d20kh + @prof + @strMod", {prof: 2, strMod: 4});
-   *
-   * // The parsed terms of the roll formula
-   * console.log(r.terms);    // [Die, OperatorTerm, NumericTerm, OperatorTerm, NumericTerm]
-   *
-   * // Execute the roll
-   * await r.evaluate();
-   *
-   * // The resulting equation after it was rolled
-   * console.log(r.result);   // 16 + 2 + 4
-   *
-   * // The total resulting from the roll
-   * console.log(r.total);    // 22
-   * ```
-   */
-  class Roll<D extends Record<string, unknown> = {}> {
-    /**
-     * @param formula - The string formula to parse
-     * @param data    - The data object against which to parse attributes within the formula
-     *                  (default: `{}`)
-     * @param options - (default: `{}`)
-     */
-    constructor(formula: string, data?: D, options?: Roll["options"]);
-
-    /**
-     * The original provided data object which substitutes into attributes of the roll formula
-     */
-    data: D;
-
-    /**
-     * Options which modify or describe the Roll
-     */
-    options: InexactPartial<Options>;
-
-    /**
-     * The identified terms of the Roll
-     */
-    terms: RollTerm[];
-
-    /**
-     * An array of inner DiceTerms which were evaluated as part of the Roll evaluation
-     * @defaultValue `[]`
-     */
-    protected _dice: DiceTerm[];
-
-    /**
-     * Store the original cleaned formula for the Roll, prior to any internal evaluation or simplification
-     */
-    protected _formula: string;
-
-    /**
-     * Track whether this Roll instance has been evaluated or not. Once evaluated the Roll is immutable.
-     * @defaultValue `false`
-     */
-    protected _evaluated: boolean;
-
-    /**
-     * Cache the numeric total generated through evaluation of the Roll.
-     * @defaultValue `undefined`
-     */
-    protected _total: number | undefined;
-
-    /** A Proxy environment for safely evaluating a string using only available Math functions */
-    static MATH_PROXY: Math;
-
-    /**
-     * The HTML template path used to render a complete Roll object to the chat log
-     * @defaultValue `"templates/dice/roll.html"`
-     */
-    static CHAT_TEMPLATE: string;
-
-    /**
-     * The HTML template used to render an expanded Roll tooltip to the chat log
-     * @defaultValue `"templates/dice/tooltip.html"`
-     */
-    static TOOLTIP_TEMPLATE: string;
-
-    /**
-     * Prepare the data structure used for the Roll.
-     * This is factored out to allow for custom Roll classes to do special data preparation using provided input.
-     * @param data - Provided roll data
-     * @returns The prepared data object
-     */
-    protected _prepareData(data: D): D;
-
-    /**
-     * Return an Array of the individual DiceTerm instances contained within this Roll.
-     */
-    get dice(): DiceTerm[];
-
-    /**
-     * Return a standardized representation for the displayed formula associated with this Roll.
-     */
-    get formula(): string;
-
-    /**
-     * The resulting arithmetic expression after rolls have been evaluated
-     */
-    get result(): string;
-
-    /**
-     * Return the total result of the Roll expression if it has been evaluated.
-     */
-    get total(): number | undefined;
-
-    /** Whether this Roll contains entirely deterministic terms or whether there is some randomness. */
-    get isDeterministic(): boolean;
-
-    /**
-     * Alter the Roll expression by adding or multiplying the number of dice which are rolled
-     * @param multiply        - A factor to multiply. Dice are multiplied before any additions.
-     * @param add             - A number of dice to add. Dice are added after multiplication.
-     * @param multiplyNumeric - Apply multiplication factor to numeric scalar terms
-     *                          (default: `false`)
-     * @returns The altered Roll expression
-     */
-    alter(multiply: number, add: number, { multiplyNumeric }?: { multiplyNumeric: boolean }): this;
-
-    /**
-     * Clone the Roll instance, returning a new Roll instance that has not yet been evaluated.
-     */
-    clone(): this;
-
-    /**
-     * Execute the Roll, replacing dice and evaluating the total result
-     * @param options - Options which inform how the Roll is evaluated
-     *                  (default: `{}`)
-     * @returns The evaluated Roll instance
-     *
-     * @example Evaluate a Roll expression
-     * ```typescript
-     * let r = new Roll("2d6 + 4 + 1d4");
-     * await r.evaluate();
-     * console.log(r.result); // 5 + 4 + 2
-     * console.log(r.total);  // 11
-     * ```
-     */
-    evaluate(options?: InexactPartial<Options> & { async: true }): Promise<Evaluated<this>>;
-    evaluate(options: InexactPartial<Options & { async: false }>): Evaluated<this>;
-    evaluate(options?: InexactPartial<Options>): Evaluated<this> | Promise<Evaluated<this>>;
-
-    /**
-     * Evaluate the roll asynchronously.
-     * A temporary helper method used to migrate behavior from 0.7.x (sync by default) to 0.9.x (async by default).
-     * @param options - Options which inform how evaluation is performed
-     * @internal
-     */
-    protected _evaluate(options?: InexactPartial<Omit<Options, "async">>): Promise<Evaluated<this>>;
-
-    /**
-     * Evaluate the roll synchronously.
-     * A temporary helper method used to migrate behavior from 0.7.x (sync by default) to 0.9.x (async by default).
-     * @param options - Options which inform how evaluation is performed
-     */
-    protected _evaluateSync(options?: InexactPartial<Omit<Options, "async">>): Evaluated<this>;
-
-    /**
-     * Safely evaluate the final total result for the Roll using its component terms.
-     * @returns The evaluated total
-     */
-    protected _evaluateTotal(): number;
-
-    /**
-     * Alias for evaluate.
-     * @see Roll#evaluate
-     */
-    roll(options?: InexactPartial<Options> & { async: true }): Promise<Evaluated<this>>;
-    roll(options: InexactPartial<Options & { async: false }>): Evaluated<this>;
-    roll(options?: InexactPartial<Options>): Evaluated<this> | Promise<Evaluated<this>>;
-
-    /**
-     * Create a new Roll object using the original provided formula and data.
-     * Each roll is immutable, so this method returns a new Roll instance using the same data.
-     * @param options - Evaluation options passed to Roll#evaluate
-     * @returns A new Roll object, rolled using the same formula and data
-     */
-    reroll(options?: InexactPartial<Options> & { async: true }): Promise<Evaluated<this>>;
-    reroll(options: InexactPartial<Options & { async: false }>): Evaluated<this>;
-    reroll(options?: InexactPartial<Options>): Evaluated<this> | Promise<Evaluated<this>>;
-
-    /**
-     * Recompile the formula string that represents this Roll instance from its component terms.
-     * @returns The re-compiled formula
-     */
-    resetFormula(): string;
-
-    /**
-     * A factory method which constructs a Roll instance using the default configured Roll class.
-     * @typeParam D - the type of data object against which to parse attributes within the formula
-     * @param formula - The formula used to create the Roll instance
-     * @param data    - The data object which provides component data for the formula
-     * @param options - Additional options which modify or describe this Roll
-     * @returns The constructed Roll instance
-     */
-    static create<D extends Record<string, unknown> = {}>(
-      formula: string,
-      data?: D,
-      options?: InexactPartial<Options>,
-    ): typeof CONFIG.Dice.rolls extends [infer T] ? T : Roll<D>;
-
-    /**
-     * Get the default configured Roll class.
-     */
-    static get defaultImplementation(): typeof Roll;
-
-    /**
-     * Transform an array of RollTerm objects into a cleaned string formula representation.
-     * @param terms - An array of terms to represent as a formula
-     * @returns The string representation of the formula
-     */
-    static getFormula(terms: RollTerm[]): string;
-
-    /**
-     * A sandbox-safe evaluation function to execute user-input code with access to scoped Math methods.
-     * @param expression - The input string expression
-     * @returns The numeric evaluated result
-     */
-    static safeEval(expression: string): number;
-
-    /**
-     * After parenthetical and arithmetic terms have been resolved, we need to simplify the remaining expression.
-     * Any remaining string terms need to be combined with adjacent non-operators in order to construct parsable terms.
-     * @param terms - An array of terms which is eligible for simplification
-     * @returns An array of simplified terms
-     */
-    static simplifyTerms(terms: RollTerm[]): RollTerm[];
-
-    /**
-     * Simulate a roll and evaluate the distribution of returned results
-     * @param formula - The Roll expression to simulate
-     * @param n       - The number of simulations
-     *                  (default: `10000`)
-     * @returns The rolled totals
-     */
-    static simulate(formula: string, n?: number): Promise<number[]>;
-
-    /**
-     * Parse a formula by following an order of operations:
-     *
-     * Step 1: Replace formula data
-     * Step 2: Split outer-most parenthetical groups
-     * Step 3: Further split outer-most dice pool groups
-     * Step 4: Further split string terms on arithmetic operators
-     * Step 5: Classify all remaining strings
-     *
-     * @param formula - The original string expression to parse
-     * @param data    - A data object used to substitute for attributes in the formula
-     * @returns A parsed array of RollTerm instances
-     */
-    static parse(formula: string, data: Record<string, unknown>): RollTerm[];
-
-    /**
-     * Replace referenced data attributes in the roll formula with values from the provided data.
-     * Data references in the formula use the \@attr syntax and would reference the corresponding attr key.
-     *
-     * @param formula - The original formula within which to replace
-     * @param data    - The data object which provides replacements
-     * @param options - Options which modify formula replacement
-     */
-    static replaceFormulaData<D extends Record<string, unknown>>(
-      formula: string,
-      data: D,
-      options?: {
-        /**
-         * The value that should be assigned to any unmatched keys.
-         * If null, the unmatched key is left as-is.
-         */
-        missing?: string;
-        /**
-         * Display a warning notification when encountering an un-matched key.
-         * (default: `false`)
-         */
-        warn?: boolean;
-      },
-    ): string;
-
-    /**
-     * Validate that a provided roll formula can represent a valid
-     * @param formula - A candidate formula to validate
-     * @returns Is the provided input a valid dice formula?
-     */
-    static validate(formula: string): boolean;
-
-    /**
-     * Split a formula by identifying its outer-most parenthetical and math terms
-     * @param _formula - The raw formula to split
-     * @returns An array of terms, split on parenthetical terms
-     */
-    protected static _splitParentheses(_formula: string): string[];
-
-    /**
-     * Handle closing of a parenthetical term to create a MathTerm expression with a function and arguments
-     */
-    protected static _splitMathArgs(expression: string): MathTerm[];
-
-    /**
-     * Split a formula by identifying its outermost dice pool terms.
-     * @param _formula - The raw formula to split
-     * @returns An array of terms, split on parenthetical terms
-     */
-    protected _splitPools(_formula: string): string[];
-
-    /**
-     * Split a formula by identifying its outermost groups using a certain group symbol like parentheses or brackets.
-     * @param _formula - The raw formula to split
-     * @param options  - Options that configure how groups are split
-     *                   (default: `{}`)
-     * @returns An array of terms, split on dice pool terms
-     */
-    protected _splitGroup(_formula: string, options?: InexactPartial<SplitGroupOptions>): string[];
-
-    /**
-     * Split a formula by identifying arithmetic terms
-     * @param _formula - The raw formula to split
-     * @returns An array of terms, split on arithmetic operators
-     */
-    protected _splitOperators(_formula: string): (string | OperatorTerm)[];
-
-    /**
-     * Temporarily remove flavor text from a string formula allowing it to be accurately parsed.
-     * @param formula - The formula to extract
-     * @returns The cleaned formula and extracted flavor mapping
-     */
-    protected static _extractFlavors(formula: string): { formula: string; flavors: Flavor };
-
-    /**
-     * Restore flavor text to a string term
-     * @param term    - The string term possibly containing flavor symbols
-     * @param flavors - The extracted flavors object
-     * @returns The restored term containing flavor text
-     */
-    protected static _restoreFlavor(term: string, flavors: Flavor): string;
-
-    /**
-     * Classify a remaining string term into a recognized RollTerm class
-     * @param term         - A remaining un-classified string
-     * @param options      - Options which customize classification
-     *                       (default: `{}`)
-     * @param intermediate - Allow intermediate terms
-     *                       (default: `true`)
-     * @param prior        - The prior classified term
-     * @param next         - The next term to classify
-     * @returns A classified RollTerm instance
-     */
-    protected static _classifyStringTerm(
-      term: string,
-      { intermediate, prior, next }?: { intermediate?: boolean; prior?: RollTerm | string; next?: RollTerm | string },
-    ): RollTerm;
-
-    /**
-     * Render the tooltip HTML for a Roll instance
-     * @returns The rendered HTML tooltip as a string
-     */
-    getTooltip(): Promise<string>;
-
-    /**
-     * Render a Roll instance to HTML
-     * @param options - Options which affect how the Roll is rendered
-     *                  (default: `{}`)
-     * @returns The rendered HTML template as a string
-     */
-    render(
-      options?: InexactPartial<{
-        /**
-         * Flavor text to include
-         * @defaultValue `undefined`
-         */
-        flavor?: string;
-
-        /**
-         * A custom HTML template path
-         * @defaultValue `this.constructor.CHAT_TEMPLATE`
-         */
-        template?: string;
-
-        /**
-         * Is the Roll displayed privately?
-         * @defaultValue `false`
-         */
-        isPrivate?: boolean;
-      }>,
-    ): Promise<string>;
-
-    /**
-     * Transform a Roll instance into a ChatMessage, displaying the roll result.
-     * This function can either create the ChatMessage directly, or return the data object that will be used to create.
-     *
-     * @param messageData - The data object to use when creating the message
-     *                      (default: `{}`)
-     * @param options     - Additional options which modify the created message.
-     *                      (default: `{}`)
-     * @param rollMode    - The template roll mode to use for the message from CONFIG.Dice.rollModes
-     * @param create      - Whether to automatically create the chat message, or only return the
-     *                      prepared chatData object.
-     *                      (default: `true`)
-     * @returns A promise which resolves to the created ChatMessage entity, if create is true
-     *          or the Object of prepared chatData otherwise.
-     */
-    toMessage<
-      T extends DeepPartial<ConstructorParameters<ConfiguredDocumentClass<typeof ChatMessage>>[0]> = Record<
-        string,
-        unknown
-      >,
-    >(
-      messageData?: T,
-      { rollMode, create }?: InexactPartial<{ rollMode?: keyof CONFIG.Dice.RollModes | "roll"; create?: true }>,
-    ): Promise<ChatMessage.ConfiguredInstance | undefined>;
-    toMessage<
-      T extends DeepPartial<ConstructorParameters<ConfiguredDocumentClass<typeof ChatMessage>>[0]> = Record<
-        string,
-        unknown
-      >,
-    >(
-      messageData: T,
-      { rollMode, create }: { rollMode?: keyof CONFIG.Dice.RollModes | "roll"; create: false },
-    ): MessageData<T>;
-    toMessage<
-      T extends DeepPartial<ConstructorParameters<ConfiguredDocumentClass<typeof ChatMessage>>[0]> = Record<
-        string,
-        unknown
-      >,
-    >(
-      messageData: T,
-      { rollMode, create }: { rollMode?: keyof CONFIG.Dice.RollModes | "roll"; create: boolean },
-    ): Promise<ChatMessage.ConfiguredInstance | undefined> | MessageData<T>;
-
-    /**
-     * Expand an inline roll element to display its contained dice result as a tooltip.
-     * @param a - The inline-roll button
-     */
-    static expandInlineResult(a: HTMLAnchorElement): Promise<void>;
-
-    /**
-     * Collapse an expanded inline roll to conceal its tooltip.
-     * @param a - The inline-roll button
-     */
-    static collapseInlineResult(a: HTMLAnchorElement): void;
-
-    /**
-     * Construct an inline roll link for this Roll.
-     * @param object - Additional options to configure how the link is constructed.
-
-     */
-    toAnchor(options?: InexactPartial<ToAnchorOptions>): HTMLAnchorElement;
-
-    /**
-     * Represent the data of the Roll as an object suitable for JSON serialization.
-     * @returns Structured data which can be serialized into JSON
-     */
-    toJSON(): {
-      class: string;
-      options: Options;
-      dice: DiceTerm[];
-      formula: string;
-      terms: RollTerm[];
-      total: number | undefined;
-      evaluated: boolean;
-    };
-
-    /**
-     * Recreate a Roll instance using a provided data object
-     * @param data - Unpacked data representing the Roll
-     * @returns A reconstructed Roll instance
-     */
-    static fromData<T extends Roll<any>>(this: ConstructorOf<T>, data: Data): T;
-
-    /**
-     * Recreate a Roll instance using a provided JSON string
-     * @param json - Serialized JSON data representing the Roll
-     * @returns A reconstructed Roll instance
-     */
-    static fromJSON(json: string): Roll;
-
-    /**
-     * Manually construct a Roll object by providing an explicit set of input terms
-     * @param terms -The array of terms to use as the basis for the Roll
-     * @param options - Additional options passed to the Roll constructor
-     * @returns The constructed Roll instance
-     *
-     * @example Construct a Roll instance from an array of component terms
-     * ```typescript
-     * const t1 = new Die({number: 4, faces: 8};
-     * const plus = new OperatorTerm({operator: "+"});
-     * const t2 = new NumericTerm({number: 8});
-     * const roll = Roll.fromTerms([t1, plus, t2]);
-     * roll.formula; // 4d8 + 8
-     * ```
-     */
-    static fromTerms<T extends Roll<any>>(
-      this: ConstructorOf<T>,
-      terms: RollTerm[],
-      options?: InexactPartial<Options>,
-    ): T;
-  }
-}
-
-export type Options = RollTerm.EvaluationOptions;
-
-interface SplitGroupOptions {
-  openRegexp: RegExp | string;
-  closeRegexp: RegExp | string;
-  openSymbol: string;
-  closeSymbol: string;
-  onClose: (group: { open: string; terms: string[]; close: string }) => string[];
-}
-
-/** Additional options to configure how the link is constructed. */
-interface ToAnchorOptions {
-  /** A custom label for the total. */
-  label: string;
-
-  /** Attributes to set on the link. (default: `{}`) */
-  attrs: Record<string, string>;
-
-  /** Custom data attributes to set on the link. (default: `{}`) */
-  dataset: Record<string, string | undefined>;
-
-  /**
-   * Additional Classes to add to the link. (default: `[]`)
-   * The classes `inline-roll` and `inline-result` are added by default.
-   */
-  classes: string[];
-
-  /** A font-awesome icon class to use as the icon instead of a d20. */
-  icon: string;
-}
-
-interface Data {
-  formula: string;
-  results: Array<number | string>;
-  terms: Array<PoolTerm.TermData | DiceTerm.Data>;
-  total: number | null;
-}
-
-type Flavor = Record<`%F${number}%`, string>;
-
-export type MessageData<T extends DeepPartial<ConstructorParameters<typeof ChatMessage>[0]>> = T & {
-  user: string;
-  type: (typeof foundry.CONST.CHAT_MESSAGE_TYPES)["ROLL"];
-  content: number;
-  sound: typeof CONFIG.sounds.dice;
-};
-
-export type Evaluated<T extends Roll> = T & { _evaluated: true; _total: number; get total(): number };
diff --git a/src/foundry/client/dice/term.d.mts b/src/foundry/client/dice/term.d.mts
deleted file mode 100644
index be2cd298b..000000000
--- a/src/foundry/client/dice/term.d.mts
+++ /dev/null
@@ -1,126 +0,0 @@
-import type { ConstructorOf, InexactPartial } from "../../../types/utils.d.mts";
-
-declare global {
-  /**
-   * An abstract class which represents a single token that can be used as part of a Roll formula.
-   * Every portion of a Roll formula is parsed into a subclass of RollTerm in order for the Roll to be fully evaluated.
-   */
-  abstract class RollTerm {
-    constructor({ options }?: { options?: RollTerm.Options });
-
-    /** An object of additional options which describes and modifies the term. */
-    options: RollTerm.Options;
-
-    /** An internal flag for whether the term has been evaluated */
-    protected _evaluated: boolean;
-
-    /**
-     * Is this term intermediate, and should be evaluated first as part of the simplification process?
-     * @defaultValue `false`
-     */
-    isIntermediate: boolean;
-
-    /** A regular expression pattern which identifies optional term-level flavor text */
-    static FLAVOR_REGEXP_STRING: string;
-
-    /** A regular expression which identifies term-level flavor text */
-    static FLAVOR_REGEXP: RegExp;
-
-    /** A regular expression used to match a term of this type */
-    static REGEXP: RegExp;
-
-    /** An array of additional attributes which should be retained when the term is serialized */
-    static SERIALIZE_ATTRIBUTES: string[];
-
-    /** A string representation of the formula expression for this RollTerm, prior to evaluation */
-    get expression(): string;
-
-    /** A string representation of the formula, including optional flavor text. */
-    get formula(): string;
-
-    /** A string or numeric representation of the final output for this term, after evaluation. */
-    get total(): number | string | null | undefined;
-
-    /** Optional flavor text which modifies and describes this term. */
-    get flavor(): string;
-
-    /** Whether this term is entirely deterministic or contains some randomness. */
-    get isDeterministic(): boolean;
-
-    /**
-     * Evaluate the roll term, populating the results Array.
-     * @param options - (default: `{}`)
-     * @returns The evaluated dice term
-     */
-    evaluate(options?: InexactPartial<RollTerm.EvaluationOptions & { async: false }>): this;
-    evaluate(options: InexactPartial<RollTerm.EvaluationOptions> & { async: true }): Promise<this>;
-    evaluate(options?: InexactPartial<RollTerm.EvaluationOptions>): this | Promise<this>;
-
-    protected _evaluate({ minimize, maximize }?: { minimize?: boolean; maximize?: boolean }): Promise<this>;
-
-    protected _evaluateSync({ minimize, maximize }?: { minimize?: boolean; maximize?: boolean }): this;
-
-    /* -------------------------------------------- */
-    /*  Serialization and Loading                   */
-    /* -------------------------------------------- */
-
-    /**
-     * Construct a RollTerm from a provided data object
-     * @param data - Provided data from an un-serialized term
-     * @returns The constructed RollTerm
-     */
-    static fromData(data: object): RollTerm;
-
-    /**
-     * * Define term-specific logic for how a de-serialized data object is restored as a functional RollTerm
-     * @param data - The de-serialized term data
-     * @returns The re-constructed RollTerm object
-     */
-    protected static _fromData<T extends RollTerm>(this: ConstructorOf<T>, data: object): T;
-
-    /**
-     * Reconstruct a RollTerm instance from a provided JSON string
-     * @param json - A serialized JSON representation of a DiceTerm
-     * @returns A reconstructed RollTerm from the provided JSON
-     */
-    static fromJSON(json: string): RollTerm;
-
-    /**
-     * Serialize the RollTerm to a JSON string which allows it to be saved in the database or embedded in text.
-     * This method should return an object suitable for passing to the JSON.stringify function.
-     */
-    toJSON(): object;
-  }
-
-  namespace RollTerm {
-    interface Options {
-      flavor?: string;
-    }
-
-    interface EvaluationOptions {
-      /**
-       * Maximize the result, obtaining the largest possible value.
-       * @defaultValue `false`
-       * */
-      maximize: boolean;
-
-      /**
-       * Minimize the result, obtaining the smallest possible value
-       * @defaultValue `false`
-       */
-      minimize: boolean;
-
-      /**
-       * Evaluate the roll asynchronously. false is deprecated
-       * @defaultValue `true`
-       */
-      async: boolean;
-    }
-
-    interface Data {
-      class: string;
-      evaluated: boolean;
-      options: Options;
-    }
-  }
-}
diff --git a/src/foundry/client/dice/terms/dice.d.mts b/src/foundry/client/dice/terms/dice.d.mts
deleted file mode 100644
index 040a6bab9..000000000
--- a/src/foundry/client/dice/terms/dice.d.mts
+++ /dev/null
@@ -1,268 +0,0 @@
-import type { InexactPartial } from "../../../../types/utils.d.mts";
-
-export {};
-
-declare global {
-  /**
-   * An abstract base class for any type of RollTerm which involves randomized input from dice, coins, or other devices.
-   */
-  abstract class DiceTerm extends RollTerm {
-    /**
-     * @param termData  - Data used to create the Dice Term, including the following:
-     *                    (default: `{}`)
-     * @param number    - The number of dice of this term to roll, before modifiers are applied
-     *                    (default: `1`)
-     * @param faces     - The number of faces on each die of this type
-     *                    (default: `6`)
-     * @param modifiers - An array of modifiers applied to the results
-     *                    (default: `[]`)
-     * @param results   - An optional array of pre-cast results for the term
-     *                    (default: `[]`)
-     * @param options   - Additional options that modify the term
-     *                    (default: `{}`)
-     */
-    constructor(termData?: InexactPartial<DiceTerm.TermData>);
-
-    /**
-     * The number of dice of this term to roll, before modifiers are applied
-     */
-    number: DiceTerm.TermData["number"];
-
-    /**
-     * The number of faces on the die
-     */
-    faces: DiceTerm.TermData["faces"];
-
-    /**
-     * An Array of dice term modifiers which are applied
-     */
-    modifiers: DiceTerm.TermData["modifiers"];
-
-    /**
-     * The array of dice term results which have been rolled
-     */
-    results: DiceTerm.Result[];
-
-    /* -------------------------------------------- */
-
-    /**
-     * Define the denomination string used to register this DiceTerm type in CONFIG.Dice.terms
-     * @defaultValue ""
-     */
-    static DENOMINATION: string;
-
-    /**
-     * Define the named modifiers that can be applied for this particular DiceTerm type.
-     * @defaultValue `{}`
-     */
-    static MODIFIERS: DiceTerm.Modifiers;
-
-    /**
-     * A regular expression pattern which captures the full set of term modifiers
-     * Anything until a space, group symbol, or arithmetic operator
-     */
-    static MODIFIERS_REGEXP_STRING: string;
-
-    /** A regular expression used to separate individual modifiers */
-    static MODIFIER_REGEXP: RegExp;
-
-    /* -------------------------------------------- */
-    /*  Dice Term Attributes                        */
-    /* -------------------------------------------- */
-
-    /** Return an array of rolled values which are still active within this term */
-    get values(): number[];
-
-    override get isDeterministic(): boolean;
-
-    /* -------------------------------------------- */
-
-    /**
-     * Alter the DiceTerm by adding or multiplying the number of dice which are rolled
-     * @param multiply - A factor to multiply. Dice are multiplied before any additions.
-     * @param add      - A number of dice to add. Dice are added after multiplication.
-     * @returns The altered term
-     */
-    alter(multiply: number, add: number): this;
-
-    /* -------------------------------------------- */
-
-    protected _evaluateSync({ minimize, maximize }?: { minimize?: boolean; maximize?: boolean }): this;
-
-    /* -------------------------------------------- */
-
-    /**
-     * Roll the DiceTerm by mapping a random uniform draw against the faces of the dice term.
-     * @param minimize - Minimize the result, obtaining the smallest possible value.
-     * @param maximize - Maximize the result, obtaining the largest possible value.
-     * @returns The produced result
-     */
-    roll({ minimize, maximize }?: { minimize: boolean; maximize: boolean }): DiceTerm.Result;
-
-    /* -------------------------------------------- */
-
-    /**
-     * Return a string used as the label for each rolled result
-     * @param result - The rolled result
-     * @returns The result label
-     */
-    getResultLabel(result: DiceTerm.Result): string;
-
-    /* -------------------------------------------- */
-
-    /**
-     * Get the CSS classes that should be used to display each rolled result
-     * @param result - The rolled result
-     * @returns The desired classes
-     */
-    getResultCSS(result: DiceTerm.Result): (string | null)[];
-
-    /* -------------------------------------------- */
-
-    /**
-     * Render the tooltip HTML for a Roll instance
-     * @returns The data object used to render the default tooltip template for this DiceTerm
-     */
-    getTooltipData(): DiceTerm.ToolTipData;
-
-    /* -------------------------------------------- */
-    /*  Modifier Helpers                            */
-    /* -------------------------------------------- */
-
-    /**
-     * Sequentially evaluate each dice roll modifier by passing the term to its evaluation function
-     * Augment or modify the results array.
-     */
-    protected _evaluateModifiers(): void;
-
-    /* -------------------------------------------- */
-
-    /**
-     * Evaluate a single modifier command, recording it in the array of evaluated modifiers
-     * @param command - The parsed modifier command
-     * @param modifier -  The full modifier request
-     */
-    protected _evaluateModifier(command: string, modifier: string): void;
-    /* -------------------------------------------- */
-
-    /**
-     * A helper comparison function.
-     * Returns a boolean depending on whether the result compares favorably against the target.
-     * @param result     - The result being compared
-     * @param comparison - The comparison operator in [=,&lt;,&lt;=,\>,\>=]
-     * @param target     - The target value
-     * @returns Is the comparison true?
-     */
-    static compareResult(result: number, comparison: string, target: number): boolean;
-
-    /* -------------------------------------------- */
-
-    /**
-     * A helper method to modify the results array of a dice term by flagging certain results are kept or dropped.
-     * @param results - The results array
-     * @param number  - The number to keep or drop
-     * @param keep    - Keep results?
-     *                  (default: `true`)
-     * @param highest - Keep the highest?
-     *                  (default: `true`)
-     * @returns The modified results array
-     */
-    protected static _keepOrDrop(
-      results: DiceTerm.Result[],
-      number: number,
-      { keep, highest }?: InexactPartial<{ keep: boolean; highest: boolean }>,
-    ): DiceTerm.Result;
-
-    /* -------------------------------------------- */
-
-    /**
-     * A reusable helper function to handle the identification and deduction of failures
-     * @param flagFailure - (default: `false`)
-     * @param flagSuccess - (default: `false`)
-     */
-    protected static _applyCount(
-      results: DiceTerm.Result[],
-      comparison: string,
-      target: number,
-      { flagSuccess, flagFailure }?: InexactPartial<{ flagSuccess: boolean; flagFailure: boolean }>,
-    ): void;
-
-    /* -------------------------------------------- */
-
-    /**
-     * A reusable helper function to handle the identification and deduction of failures
-     * @param deductFailure - (default: `false`)
-     * @param invertFailure - (default: `false`)
-     */
-    protected static _applyDeduct(
-      results: DiceTerm.Result[],
-      comparison: string,
-      target: number,
-      { deductFailure, invertFailure }?: InexactPartial<{ deductFailure: boolean; invertFailure: boolean }>,
-    ): void;
-
-    /* -------------------------------------------- */
-    /*  Factory Methods                             */
-    /* -------------------------------------------- */
-
-    /**
-     * Determine whether a string expression matches this type of term
-     * @param expression - The expression to parse
-     * @param options - Additional options which customize the match
-     * @param imputeNumber - Allow the number of dice to be optional, i.e. "d6"
-     *                       (default: `true`)
-     */
-    static matchTerm(
-      expression: string,
-      { imputeNumber }?: InexactPartial<{ imputeNumber: boolean }>,
-    ): RegExpMatchArray | null;
-
-    /* -------------------------------------------- */
-
-    /**
-     * Construct a term of this type given a matched regular expression array.
-     * @param match - The matched regular expression array
-     * @returns The constructed term
-     */
-    static fromMatch(match: RegExpMatchArray): DiceTerm;
-  }
-
-  namespace DiceTerm {
-    interface Data extends Partial<TermData> {
-      class?: string;
-      results: DiceTerm.Result[];
-    }
-
-    interface TermData {
-      number: number;
-      faces: number;
-      modifiers: string[];
-      results: Result[];
-      options: DiceTerm.Options;
-    }
-
-    type Options = RollTerm.Options;
-
-    interface Result {
-      result: number;
-      active?: boolean;
-      count?: number;
-      success?: boolean;
-      failure?: boolean;
-      discarded?: boolean;
-      rerolled?: boolean;
-      exploded?: boolean;
-    }
-
-    interface ToolTipData {
-      formula: string;
-      total: number;
-      faces: number;
-      flavor: string;
-      rolls: { result: string; classes: string }[];
-    }
-
-    // eslint-disable-next-line @typescript-eslint/no-empty-interface
-    interface Modifiers {}
-  }
-}
diff --git a/src/foundry/client/dice/terms/index.d.mts b/src/foundry/client/dice/terms/index.d.mts
deleted file mode 100644
index 94b77fdd9..000000000
--- a/src/foundry/client/dice/terms/index.d.mts
+++ /dev/null
@@ -1,7 +0,0 @@
-import "./dice.d.mts";
-import "./math.d.mts";
-import "./numeric.d.mts";
-import "./operator.d.mts";
-import "./parenthetical.d.mts";
-import "./pool.d.mts";
-import "./string.d.mts";
diff --git a/src/foundry/client/dice/terms/math.d.mts b/src/foundry/client/dice/terms/math.d.mts
deleted file mode 100644
index 7a2ff8636..000000000
--- a/src/foundry/client/dice/terms/math.d.mts
+++ /dev/null
@@ -1,69 +0,0 @@
-export {};
-
-declare global {
-  /**
-   * A type of RollTerm used to apply a function from the Math library.
-   */
-  class MathTerm extends RollTerm {
-    constructor({ fn, terms, options }: MathTermData);
-
-    /**
-     * The named function in the Math environment which should be applied to the term
-     */
-    fn: MathTermData["fn"];
-
-    /** An array of string argument terms for the function */
-    terms: NonNullable<MathTermData["terms"]>;
-
-    /**
-     * The cached Roll instances for each function argument
-     * @defaultValue `[]`
-     */
-    rolls: Roll[];
-
-    /**
-     * The cached result of evaluating the method arguments
-     * @defaultValue `undefined`
-     */
-    result?: number;
-
-    /**
-     * @defaultValue `true`
-     */
-    isIntermediate: boolean;
-
-    /**
-     * @defaultValue `["fn", "terms"]`
-     */
-    static SERIALIZE_ATTRIBUTES: string[];
-
-    /**
-     * An array of evaluated DiceTerm instances that should be bubbled up to the parent Roll
-     */
-    get dice(): DiceTerm[] | undefined;
-
-    get total(): number | undefined;
-
-    get expression(): string;
-
-    override get isDeterministic(): boolean;
-
-    protected _evaluateSync({ minimize, maximize }?: { minimize?: boolean; maximize?: boolean }): this;
-
-    protected _evaluate({ minimize, maximize }?: { minimize?: boolean; maximize?: boolean }): Promise<this>;
-  }
-}
-
-interface MathTermData {
-  fn: string;
-
-  /**
-   * @defaultValue `[]`
-   */
-  terms?: string[];
-
-  /**
-   * @defaultValue `{}`
-   */
-  options?: RollTerm.Options;
-}
diff --git a/src/foundry/client/dice/terms/numeric.d.mts b/src/foundry/client/dice/terms/numeric.d.mts
deleted file mode 100644
index 5c5f1cd4d..000000000
--- a/src/foundry/client/dice/terms/numeric.d.mts
+++ /dev/null
@@ -1,53 +0,0 @@
-export {};
-
-declare global {
-  /**
-   * A type of RollTerm used to represent static numbers.
-   */
-  class NumericTerm extends RollTerm {
-    constructor({ number, options }: NumericTermData);
-
-    number: NumericTermData["number"];
-
-    /**
-     * @defaultValue
-     * ```typescript
-     * new RegExp(`^([0-9]+(?:\\.[0-9]+)?)${RollTerm.FLAVOR_REGEXP_STRING}?$`)
-     * ```
-     */
-    static REGEXP: RegExp;
-
-    /**
-     * @defaultValue `["number"]`
-     */
-    static SERIALIZE_ATTRIBUTES: string[];
-
-    get expression(): string;
-
-    get total(): number;
-
-    /**
-     * Determine whether a string expression matches a NumericTerm
-     * @param expression - The expression to parse
-     */
-    static matchTerm(expression: string): RegExpMatchArray | null;
-
-    /* -------------------------------------------- */
-
-    /**
-     * Construct a term of this type given a matched regular expression array.
-     * @param match -  The matched regular expression array
-     * @returns The constructed term
-     */
-    static fromMatch(match: RegExpMatchArray): NumericTerm;
-  }
-}
-
-interface NumericTermData {
-  number: number;
-
-  /**
-   * @defaultValue `{}`
-   */
-  options?: RollTerm.Options;
-}
diff --git a/src/foundry/client/dice/terms/operator.d.mts b/src/foundry/client/dice/terms/operator.d.mts
deleted file mode 100644
index f29935a7f..000000000
--- a/src/foundry/client/dice/terms/operator.d.mts
+++ /dev/null
@@ -1,22 +0,0 @@
-export {};
-
-declare global {
-  /**
-   * A type of RollTerm used to denote and perform an arithmetic operation.
-   */
-  class OperatorTerm extends RollTerm {
-    constructor({ operator, options }?: Partial<OperatorTerm.TermData>);
-
-    operator: OperatorTerm.TermData["operator"];
-
-    /** An array of operators which represent arithmetic operations */
-    static OPERATORS: ["+", "-", "*", "/", "%"];
-  }
-
-  namespace OperatorTerm {
-    interface TermData {
-      operator: string;
-      options?: RollTerm.Options;
-    }
-  }
-}
diff --git a/src/foundry/client/dice/terms/parenthetical.d.mts b/src/foundry/client/dice/terms/parenthetical.d.mts
deleted file mode 100644
index acd13a76d..000000000
--- a/src/foundry/client/dice/terms/parenthetical.d.mts
+++ /dev/null
@@ -1,65 +0,0 @@
-export {};
-
-declare global {
-  /**
-   * A type of RollTerm used to enclose a parenthetical expression to be recursively evaluated.
-   */
-  class ParentheticalTerm extends RollTerm {
-    constructor({ term, roll, options }: ParentheticalTerm.TermData);
-
-    /** The original provided string term used to construct the parenthetical */
-    term: ParentheticalTerm.TermData["term"];
-
-    /** Alternatively, an already-evaluated Roll instance may be passed directly */
-    roll: ParentheticalTerm.TermData["roll"];
-
-    /**
-     * The regular expression pattern used to identify the opening of a parenthetical expression.
-     * This could also identify the opening of a math function.
-     * @defaultValue
-     * ```typescript
-     * /([A-z][A-z0-9]+)?\(/g;
-     * ```
-     */
-    static OPEN_REGEXP: RegExp;
-
-    /**
-     * A regular expression pattern used to identify the closing of a parenthetical expression.
-     * @defaultValue
-     * ```typescript
-     * new RegExp("\\)(?:\\$\\$F[0-9]+\\$\\$)?", "g");
-     * ```
-     */
-    static CLOSE_REGEXP: RegExp;
-
-    /** An array of evaluated DiceTerm instances that should be bubbled up to the parent Roll */
-    get dice(): DiceTerm[];
-
-    override get isDeterministic(): boolean;
-
-    /**
-     * Construct a ParentheticalTerm from an Array of component terms which should be wrapped inside the parentheses.
-     * @param terms - The array of terms to use as internal parts of the parenthetical
-     * @param options - Additional options passed to the ParentheticalTerm constructor
-     * @returns  The constructed ParentheticalTerm instance
-     *
-     * @example Create a Parenthetical Term from an array of component RollTerm instances
-     * ```typescript
-     * const d6 = new Die({number: 4, faces: 6});
-     * const plus = new OperatorTerm({operator: "+"});
-     * const bonus = new NumericTerm({number: 4});
-     * t = ParentheticalTerm.fromTerms([d6, plus, bonus]);
-     * t.formula; // (4d6 + 4)
-     * ```
-     */
-    static fromTerms(terms: RollTerm[], options?: Partial<RollTerm.Options>): ParentheticalTerm;
-  }
-
-  namespace ParentheticalTerm {
-    interface TermData {
-      term: string;
-      roll: Roll;
-      options: RollTerm.Options;
-    }
-  }
-}
diff --git a/src/foundry/client/dice/terms/pool.d.mts b/src/foundry/client/dice/terms/pool.d.mts
deleted file mode 100644
index 5fbac97c4..000000000
--- a/src/foundry/client/dice/terms/pool.d.mts
+++ /dev/null
@@ -1,238 +0,0 @@
-import type { ConstructorOf } from "../../../../types/utils.d.mts";
-
-declare global {
-  /**
-   * A type of RollTerm which encloses a pool of multiple inner Rolls which are evaluated jointly.
-   *
-   * A dice pool represents a set of Roll expressions which are collectively modified to compute an effective total
-   * across all Rolls in the pool. The final total for the pool is defined as the sum over kept rolls, relative to any
-   * success count or margin.
-   *
-   * @example Keep the highest of the 3 roll expressions
-   * ```typescript
-   * let pool = new PoolTerm({
-   *   terms: ["4d6", "3d8 - 1", "2d10 + 3"],
-   *   modifiers: ["kh"]
-   * });
-   * pool.evaluate();
-   * ```
-   */
-  class PoolTerm extends RollTerm {
-    constructor({ terms, modifiers, rolls, results, options }?: PoolTermConstructorData);
-
-    /**
-     * The original provided terms to the Dice Pool
-     */
-    terms: PoolTerm.TermData["terms"];
-
-    /**
-     * The string modifiers applied to resolve the pool
-     */
-    modifiers: PoolTerm.TermData["modifiers"];
-
-    /**
-     * Each component term of a dice pool is evaluated as a Roll instance
-     */
-    rolls: PoolTerm.TermData["rolls"];
-
-    /**
-     * The array of dice pool results which have been rolled
-     */
-    results: PoolTerm.TermData["results"];
-
-    /**
-     * Define the modifiers that can be used for this particular DiceTerm type.
-     */
-    static MODIFIERS: PoolTerm.Modifiers;
-
-    /**
-     * The regular expression pattern used to identify the opening of a dice pool expression.
-     * @defaultValue `/{/g`
-     */
-    static OPEN_REGEXP: RegExp;
-
-    /**
-     * A regular expression pattern used to identify the closing of a dice pool expression
-     * @defaultValue
-     * ```typescript
-     * new RegExp(`}${DiceTerm.MODIFIERS_REGEXP_STRING}?(?:\\$\\$F[0-9]+\\$\\$)?`, "g");
-     * ```
-     */
-    static CLOSE_REGEXP: RegExp;
-
-    /**
-     * A regular expression pattern used to match the entirety of a DicePool expression.
-     * @defaultValue
-     * ```typescript
-     * new RegExp(`{([^}]+)}${DiceTerm.MODIFIERS_REGEXP_STRING}?(?:\\$\\$F[0-9]+\\$\\$)?`);
-     * ```
-     */
-    static REGEXP: RegExp;
-
-    /**
-     * @defaultValue `["terms", "modifiers", "rolls", "results"]`
-     */
-    static SERIALIZE_ATTRIBUTES: string[];
-
-    /**
-     * Return an Array of each individual DiceTerm instances contained within the PoolTerm.
-     */
-    get dice(): DiceTerm[];
-
-    get expression(): string;
-
-    get total(): undefined | number;
-
-    /**
-     * Return an array of rolled values which are still active within the PoolTerm
-     */
-    get values(): number[];
-
-    /**
-     * Alter the DiceTerm by adding or multiplying the number of dice which are rolled
-     * @param args - Arguments passed to each contained Roll#alter method.
-     * @returns The altered pool
-     */
-    alter(...args: Parameters<Roll["alter"]>): this;
-
-    protected _evaluateSync({ minimize, maximize }?: { minimize?: boolean; maximize?: boolean }): this;
-
-    protected _evaluate({ minimize, maximize }?: { minimize?: boolean; maximize?: boolean }): Promise<this>;
-
-    /**
-     * Use the same logic as for the DiceTerm to avoid duplication
-     * @see DiceTerm#_evaluateModifiers
-     */
-    protected _evaluateModifiers(): void;
-
-    /**
-     * Use the same logic as for the DiceTerm to avoid duplication
-     * @see DiceTerm#_evaluateModifier
-     */
-    protected _evaluateModifier(command: string, modifier: string): void;
-
-    protected static _fromData<T extends RollTerm>(this: ConstructorOf<T>, data: object): T;
-
-    toJSON(): object;
-
-    /**
-     * Given a string formula, create and return an evaluated PoolTerm object
-     * @param formula - The string formula to parse
-     * @param options - Additional options applied to the PoolTerm
-     * @returns The evaluated PoolTerm object or null if the formula is invalid
-     */
-    static fromExpression<T extends RollTerm>(
-      this: ConstructorOf<T>,
-      formula: string,
-      options?: RollTerm.Options,
-    ): T | null;
-
-    /**
-     * Create a PoolTerm by providing an array of existing Roll objects
-     * @param rolls - An array of Roll objects from which to create the pool
-     * @returns The constructed PoolTerm comprised of the provided rolls
-     */
-    static fromRolls<T extends PoolTerm>(this: ConstructorOf<T>, rolls?: Roll[]): T;
-
-    /**
-     * Keep a certain number of highest or lowest dice rolls from the result set.
-     * @example
-     * `{1d6,1d8,1d10,1d12}kh2` Keep the 2 best rolls from the pool
-     * @example
-     * `{1d12,6}kl` Keep the lowest result in the pool
-     *
-     * @param modifier - The matched modifier query
-     */
-    keep(modifier: string): ReturnType<Die["keep"]>;
-
-    /**
-     * Keep a certain number of highest or lowest dice rolls from the result set.
-     * @example
-     * `{1d6,1d8,1d10,1d12}dl3` Drop the 3 worst results in the pool
-     * @example
-     * `{1d12,6}dh` Drop the highest result in the pool
-     *
-     * @param modifier - The matched modifier query
-     */
-    drop(modifier: string): ReturnType<Die["drop"]>;
-
-    /**
-     * Count the number of successful results which occurred in the pool.
-     * Successes are counted relative to some target, or relative to the maximum possible value if no target is given.
-     * Applying a count-success modifier to the results re-casts all results to 1 (success) or 0 (failure)
-     * @example
-     * `20d20cs` Count the number of dice which rolled a 20
-     * @example
-     * `20d20cs>10` Count the number of dice which rolled higher than 10
-     * @example
-     * `20d20cs<10` Count the number of dice which rolled less than 10
-     *
-     * @param modifier - The matched modifier query
-     */
-    countSuccess(modifier: string): ReturnType<Die["countSuccess"]>;
-
-    /**
-     * Count the number of failed results which occurred in a given result set.
-     * Failures are counted relative to some target, or relative to the lowest possible value if no target is given.
-     * Applying a count-failures modifier to the results re-casts all results to 1 (failure) or 0 (non-failure)
-     * @example
-     * `6d6cf` Count the number of dice which rolled a 1 as failures
-     * @example
-     * `6d6cf<=3` Count the number of dice which rolled less than 3 as failures
-     * @example
-     * `6d6cf>4` Count the number of dice which rolled greater than 4 as failures
-     *
-     * @param modifier - The matched modifier query
-     */
-    countFailures(modifier: string): ReturnType<Die["countFailures"]>;
-  }
-
-  namespace PoolTerm {
-    /**
-     * @remarks This interface is not defined by foundry itself. It only exists
-     * to allow module and system authors to use it for declaration merging,
-     * enabling them to add additional modifiers for {@link PoolTerm}s.
-     */
-    interface Modifiers {
-      k: "keep";
-      kh: "keep";
-      kl: "keep";
-      d: "drop";
-      dh: "drop";
-      dl: "drop";
-      cs: "countSuccess";
-      cf: "countFailures";
-    }
-
-    type TermData = Required<PoolTermConstructorData>;
-  }
-}
-
-interface PoolTermConstructorData {
-  /**
-   * @defaultValue `[]`
-   */
-  terms?: string[];
-
-  get isDeterministic(): boolean;
-
-  /**
-   * @defaultValue `[]`
-   */
-  modifiers?: string[];
-
-  /**
-   * @defaultValue `[]`
-   */
-  rolls?: Roll[];
-
-  /**
-   * @defaultValue `[]`
-   */
-  results?: DiceTerm.Result[];
-
-  /**
-   * @defaultValue `{}`
-   */
-  options?: RollTerm.Options;
-}
diff --git a/src/foundry/client/dice/terms/string.d.mts b/src/foundry/client/dice/terms/string.d.mts
deleted file mode 100644
index 15e06151a..000000000
--- a/src/foundry/client/dice/terms/string.d.mts
+++ /dev/null
@@ -1,31 +0,0 @@
-import type { InexactPartial } from "../../../../types/utils.d.mts";
-
-declare global {
-  /**
-   * A type of RollTerm used to represent strings which have not yet been matched.
-   */
-  class StringTerm extends RollTerm {
-    constructor({ term, options }: StringTermConstructorData);
-
-    term: StringTermConstructorData["term"];
-
-    /**
-     * @defaultValue `["term"]`
-     */
-    static SERIALIZE_ATTRIBUTES: string[];
-
-    get expression(): string;
-
-    get total(): string;
-
-    override get isDeterministic(): boolean;
-
-    evaluate(options?: InexactPartial<RollTerm.EvaluationOptions>): never;
-  }
-}
-
-interface StringTermConstructorData {
-  term: string;
-
-  options?: RollTerm.Options;
-}
diff --git a/src/foundry/client/dice/twister.d.mts b/src/foundry/client/dice/twister.d.mts
deleted file mode 100644
index 8098c63d5..000000000
--- a/src/foundry/client/dice/twister.d.mts
+++ /dev/null
@@ -1,138 +0,0 @@
-export {};
-
-declare global {
-  /**
-   * A standalone, pure JavaScript implementation of the Mersenne Twister pseudo random number generator.
-   *
-   * author: Raphael Pigulla \<pigulla\@four66.com\>
-   * version: 0.2.3
-   * license:
-   * Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
-   * All rights reserved.
-   *
-   * Redistribution and use in source and binary forms, with or without
-   * modification, are permitted provided that the following conditions
-   * are met:
-   *
-   * 1. Redistributions of source code must retain the above copyright
-   * notice, this list of conditions and the following disclaimer.
-   *
-   * 2. Redistributions in binary form must reproduce the above copyright
-   * notice, this list of conditions and the following disclaimer in the
-   * documentation and/or other materials provided with the distribution.
-   *
-   * 3. The names of its contributors may not be used to endorse or promote
-   * products derived from this software without specific prior written
-   * permission.
-   *
-   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-   * A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-   * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-   */
-  class MersenneTwister {
-    /**
-     * Instantiates a new Mersenne Twister.
-     * @param seed - The initial seed value, if not provided the current timestamp will be used.
-     */
-    constructor(seed?: number);
-
-    /**
-     * Initializes the state vector by using one unsigned 32-bit integer "seed", which may be zero.
-     *
-     * since: 0.1.0
-     * @param seed - The seed value.
-     */
-    seed(seed: number): number;
-
-    /**
-     * Initializes the state vector by using an array key[] of unsigned 32-bit integers of the specified length. If
-     * length is smaller than 624, then each array of 32-bit integers gives distinct initial state vector. This is
-     * useful if you want a larger seed space than 32-bit word.
-     *
-     * since: 0.1.0
-     * @param vector - The seed vector.
-     */
-    seedArray(vector: number[]): void;
-
-    /**
-     * Generates a random unsigned 32-bit integer.
-     *
-     * since: 0.1.0
-     */
-    int(): number;
-
-    /**
-     * Generates a random unsigned 31-bit integer.
-     *
-     * since: 0.1.0
-     */
-    int31(): number;
-
-    /**
-     * Generates a random real in the interval [0;1] with 32-bit resolution.
-     *
-     * since: 0.1.0
-     */
-    real(): number;
-
-    /**
-     * Generates a random real in the interval ]0;1[ with 32-bit resolution.
-     *
-     * since: 0.1.0
-     */
-    realx(): number;
-
-    /**
-     * Generates a random real in the interval [0;1[ with 32-bit resolution.
-     *
-     * since: 0.1.0
-     */
-    rnd(): number;
-
-    /**
-     * Generates a random real in the interval [0;1[ with 32-bit resolution.
-     *
-     * Same as .rnd() method - for consistency with Math.random() interface.
-     *
-     * since: 0.2.0
-     * @see {@link MersenneTwister#rnd}
-     */
-    random(): number;
-
-    /**
-     * Generates a random real in the interval [0;1[ with 53-bit resolution.
-     *
-     * since: 0.1.0
-     */
-    rndHiRes(): number;
-
-    /**
-     * A pseudo-normal distribution using the Box-Muller transform.
-     * @param mu    - The normal distribution mean
-     * @param sigma - The normal distribution standard deviation
-     */
-    normal(mu: number, sigma: number): number;
-
-    /**
-     * A factory method for generating random uniform rolls
-     * @see {@link MersenneTwister#random}
-     */
-    static random(): number;
-
-    /**
-     * A factory method for generating random normal rolls
-     * @see {@link MersenneTwister#normal}
-     */
-    static normal(mu: number, sigma: number): number;
-  }
-
-  const twist: MersenneTwister;
-}
diff --git a/src/foundry/client/game.d.mts b/src/foundry/client/game.d.mts
index 8bedb3cfb..8218b9984 100644
--- a/src/foundry/client/game.d.mts
+++ b/src/foundry/client/game.d.mts
@@ -6,7 +6,6 @@ import type {
   ModuleRequiredOrOptional,
 } from "../../types/helperTypes.d.mts";
 import type { StoredDocument, ValueOf } from "../../types/utils.d.mts";
-import type { BasePackage } from "../common/packages/module.d.ts";
 
 interface EarlierEvents {
   none: never;
@@ -566,10 +565,12 @@ declare global {
   // They're merged with `Game` to preserve the invariant `XYZGame instanceof Game`.
   // They're interfaces for easier user declaration merges as well as to give intellisense better names to use as the expanded type is intimidating.
 
+  /* eslint-disable @typescript-eslint/no-empty-object-type */
   interface InitGame extends _InitGame {}
   interface I18nInitGame extends _I18nInitGame {}
   interface SetupGame extends _SetupGame {}
   interface ReadyGame extends _ReadyGame {}
+  /* eslint-enable @typescript-eslint/no-empty-object-type */
 
   interface HotReloadData {
     /** The type of package which was modified */
@@ -644,8 +645,8 @@ declare global {
           private?: boolean;
           system?: string | undefined;
           type: foundry.CONST.COMPENDIUM_DOCUMENT_TYPES;
-          packageName: BasePackage["_source"]["id"];
-          packageType: BasePackage["type"];
+          packageName: foundry.packages.BasePackage["_source"]["id"];
+          packageType: foundry.packages.BasePackage["type"];
           id: string;
         }
       >;
diff --git a/src/foundry/client/head.d.mts b/src/foundry/client/head.d.mts
index 76345728e..fd72279db 100644
--- a/src/foundry/client/head.d.mts
+++ b/src/foundry/client/head.d.mts
@@ -3,6 +3,7 @@ import type { EarlierEvents, InitializationEvent } from "./game.d.mts";
 type ValidRanHooks = Extract<keyof AssumeHookRan, InitializationEvent>;
 
 type _UninitializedGame = { [K in keyof Game]?: never };
+// eslint-disable-next-line @typescript-eslint/no-empty-object-type
 interface UninitializedGame extends _UninitializedGame {}
 
 // These type aliases are used for intellisense reasons so that the type displays `UninitializedGame | InitGame | ...` instead of a too complex looking type.
diff --git a/src/foundry/client/index.d.mts b/src/foundry/client/index.d.mts
index 35b88bbba..c1a537974 100644
--- a/src/foundry/client/index.d.mts
+++ b/src/foundry/client/index.d.mts
@@ -4,7 +4,6 @@ import "./av/index.d.mts";
 import "./config.d.mts";
 import "./core/index.d.mts";
 import "./data/index.d.mts";
-import "./dice/index.d.mts";
 import "./game.d.mts";
 import "./head.d.mts";
 import "./hooks.d.mts";
diff --git a/src/foundry/client/pixi/board.d.mts b/src/foundry/client/pixi/board.d.mts
index f19ad96d5..be0f4314c 100644
--- a/src/foundry/client/pixi/board.d.mts
+++ b/src/foundry/client/pixi/board.d.mts
@@ -813,6 +813,7 @@ declare global {
   }
 
   // Most canvas group properties have explicit type definitions, but some are left off
+  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
   interface Canvas extends CanvasGroups {}
 
   interface CanvasPerformanceSettings {
diff --git a/src/foundry/client/ui/filepicker.d.mts b/src/foundry/client/ui/filepicker.d.mts
index 8bcf2b941..0080262b4 100644
--- a/src/foundry/client/ui/filepicker.d.mts
+++ b/src/foundry/client/ui/filepicker.d.mts
@@ -1,4 +1,4 @@
-import type { MaybePromise, ValueOf } from "../../../types/utils.d.mts";
+import type { EmptyObject, MaybePromise, ValueOf } from "../../../types/utils.d.mts";
 
 declare global {
   interface FilePickerOptions extends ApplicationOptions {
@@ -72,7 +72,7 @@ declare global {
      * The latest set of results browsed from the server
      * @remarks This is never set.
      */
-    results: {};
+    results: EmptyObject;
 
     /**
      * The general file type which controls the set of extensions which will be accepted
@@ -309,7 +309,7 @@ declare global {
       file: File,
       body?: FilePicker.UploadBody,
       options?: FilePicker.UploadOptions,
-    ): Promise<FilePicker.UploadResult | false | void | {}>;
+    ): Promise<FilePicker.UploadResult | false | void | EmptyObject>;
 
     /**
      * A convenience function that uploads a file to a given package's persistent /storage/ directory
@@ -328,7 +328,7 @@ declare global {
       file: File,
       body?: FilePicker.UploadBody,
       options?: FilePicker.UploadOptions,
-    ): Promise<FilePicker.UploadResult | false | void | {}>;
+    ): Promise<FilePicker.UploadResult | false | void | EmptyObject>;
 
     /**
      * Additional actions performed when the file-picker UI is rendered
diff --git a/src/foundry/common/packages/base-world.d.mts b/src/foundry/common/packages/base-world.d.mts
index 5cc6df7fe..b145b6d0b 100644
--- a/src/foundry/common/packages/base-world.d.mts
+++ b/src/foundry/common/packages/base-world.d.mts
@@ -61,6 +61,7 @@ type BaseWorldSchema = Merge<
 >;
 
 declare namespace BaseWorld {
+  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
   interface Schema extends BaseWorldSchema {}
 }
 
diff --git a/src/foundry/common/packages/module.d.mts b/src/foundry/common/packages/module.d.mts
index e2c77c6fe..5e1ce1520 100644
--- a/src/foundry/common/packages/module.d.mts
+++ b/src/foundry/common/packages/module.d.mts
@@ -26,6 +26,7 @@ declare global {
    * The data structure of a package manifest. This data structure is extended by BasePackage subclasses to add additional
    * type-specific fields.
    */
+  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
   interface PackageManifestData
     extends foundry.data.fields.SchemaField.InnerAssignmentType<foundry.packages.BasePackage.Schema> {}
 }
diff --git a/src/foundry/common/utils/helpers.d.mts b/src/foundry/common/utils/helpers.d.mts
index c9e7c1a35..ef3900b99 100644
--- a/src/foundry/common/utils/helpers.d.mts
+++ b/src/foundry/common/utils/helpers.d.mts
@@ -632,6 +632,7 @@ export function colorStringToHex(color: string): number | null;
  *
  * @internal
  */
+// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
 type NonStringifiable = undefined | Function | symbol;
 
 /**
diff --git a/src/types/config.d.mts b/src/types/config.d.mts
index 9daeab6c8..e354e5858 100644
--- a/src/types/config.d.mts
+++ b/src/types/config.d.mts
@@ -32,7 +32,7 @@ declare global {
    * const referenceToGame: Game = game; // ok! :)
    * ```
    */
-  // eslint-disable-next-line @typescript-eslint/no-empty-interface
+  // eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-empty-object-type
   interface AssumeHookRan {}
 
   /**
@@ -61,7 +61,7 @@ declare global {
    * }
    * ```
    */
-  //eslint-disable-next-line @typescript-eslint/no-empty-interface
+  // eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-empty-object-type
   interface DocumentClassConfig {}
 
   /**
@@ -90,7 +90,7 @@ declare global {
    * }
    * ```
    */
-  //eslint-disable-next-line @typescript-eslint/no-empty-interface
+  // eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-empty-object-type
   interface PlaceableObjectClassConfig {}
 
   /**
@@ -169,7 +169,7 @@ declare global {
    * }
    * ```
    */
-  // eslint-disable-next-line @typescript-eslint/no-empty-interface
+  // eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-empty-object-type
   interface DataConfig {}
 
   /**
@@ -180,20 +180,20 @@ declare global {
    * - if mode is "exact", the return type is the exact data object, and will not allow for any additional properties to be returned.
    * - if mode is "object", the return type is a generic object, and will allow for any object to be returned, regardless of the actual data object.
    */
-  // eslint-disable-next-line @typescript-eslint/no-empty-interface
+  // eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-empty-object-type
   interface GetDataConfig {}
 
-  // eslint-disable-next-line @typescript-eslint/no-empty-interface
+  // eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-empty-object-type
   interface DataModelConfig {}
 
   /** @see {@link DataConfig} */
-  // eslint-disable-next-line @typescript-eslint/no-empty-interface
+  // eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-empty-object-type
   interface SourceConfig {}
 
-  // eslint-disable-next-line @typescript-eslint/no-empty-interface
+  // eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-empty-object-type
   interface FlagConfig {}
 
-  // eslint-disable-next-line @typescript-eslint/no-empty-interface
+  // eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-empty-object-type
   interface WebRTCConfig {}
 
   /**
@@ -209,7 +209,7 @@ declare global {
    * const moduleApi: APIObject | undefined = game.module.get("module-id")?.api;
    * ```
    */
-  // eslint-disable-next-line @typescript-eslint/no-empty-interface
+  // eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-empty-object-type
   interface ModuleConfig {}
 
   /**
@@ -224,7 +224,7 @@ declare global {
    * const module: Game.ModuleData<foundry.packages.ModuleData> = game.module.get("module-id");
    * ```
    */
-  // eslint-disable-next-line @typescript-eslint/no-empty-interface
+  // eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-empty-object-type
   interface RequiredModules {}
 }
 
diff --git a/src/types/helperTypes.d.mts b/src/types/helperTypes.d.mts
index 60052837a..1fc0f8fb8 100644
--- a/src/types/helperTypes.d.mts
+++ b/src/types/helperTypes.d.mts
@@ -1,5 +1,5 @@
 import type { ConfiguredDocuments } from "./configuredDocuments.d.mts";
-import type { DeepPartial } from "./utils.d.mts";
+import type { DeepPartial, EmptyObject } from "./utils.d.mts";
 
 /**
  * Returns the type of the constructor data for the given {@link foundry.abstract.Document}.
@@ -52,9 +52,9 @@ export type ConfiguredObjectClassForName<Name extends PlaceableDocumentType> = C
 
 export type ConfiguredLayerClassForName<Name extends PlaceableDocumentType> = CONFIG[Name]["layerClass"];
 
-export type ConfiguredData<Name extends string> = Name extends keyof DataConfig ? DataConfig[Name] : {};
+export type ConfiguredData<Name extends string> = Name extends keyof DataConfig ? DataConfig[Name] : EmptyObject;
 
-export type ConfiguredSource<Name extends string> = Name extends keyof SourceConfig ? SourceConfig[Name] : {};
+export type ConfiguredSource<Name extends string> = Name extends keyof SourceConfig ? SourceConfig[Name] : EmptyObject;
 
 export type ConfiguredFlags<T extends string> = T extends keyof FlagConfig
   ? FlagConfig[T] & Record<string, unknown>
@@ -62,7 +62,7 @@ export type ConfiguredFlags<T extends string> = T extends keyof FlagConfig
 
 export type ModuleRequiredOrOptional<Name extends string> = Name extends keyof RequiredModules ? never : undefined;
 
-export type ConfiguredModuleData<Name extends string> = Name extends keyof ModuleConfig ? ModuleConfig[Name] : {};
+export type ConfiguredModuleData<Name extends string> = GetKey<ModuleConfig, Name, EmptyObject>;
 
 export type ConfiguredModule<Name extends string> =
   ModuleRequiredOrOptional<Name> extends never
@@ -193,6 +193,7 @@ export type InterfaceToObject<T extends object> = {
 export type HandleEmptyObject<
   T extends Record<string, unknown>,
   D extends Record<string, unknown> = Record<string, never>,
+  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
 > = [{}] extends [T] ? D : T;
 
 /**
diff --git a/src/types/utils.d.mts b/src/types/utils.d.mts
index f482ced89..365b3c88e 100644
--- a/src/types/utils.d.mts
+++ b/src/types/utils.d.mts
@@ -208,6 +208,7 @@ export type GetDataReturnType<T extends object> = GetDataConfigOptions<T>[GetDat
 export type HandleEmptyObject<
   T extends Record<string, unknown>,
   D extends Record<string, unknown> = Record<string, never>,
+  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
 > = [{}] extends [T] ? D : T;
 
 /**
@@ -373,7 +374,7 @@ export type MaybePromise<T> = T | Promise<T>;
  * semantics of `{}` in TypeScript.
  */
 // This type is not meant to be extended and it's meant to be the explicit version of what the type `{}` does, i.e. allow any type besides `null` or `undefined`.
-// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
+// eslint-disable-next-line @typescript-eslint/consistent-type-definitions, @typescript-eslint/no-empty-object-type
 export type NonNullish = {};
 
 /**


Test patch:
diff --git a/tests/foundry/client/dice/dice/coin.test-d.ts b/tests/foundry/client-esm/dice/dice/coin.test-d.ts
similarity index 100%
rename from tests/foundry/client/dice/dice/coin.test-d.ts
rename to tests/foundry/client-esm/dice/dice/coin.test-d.ts
diff --git a/tests/foundry/client/dice/dice/die.test-d.ts b/tests/foundry/client-esm/dice/dice/die.test-d.ts
similarity index 100%
rename from tests/foundry/client/dice/dice/die.test-d.ts
rename to tests/foundry/client-esm/dice/dice/die.test-d.ts
diff --git a/tests/foundry/client/dice/dice/fate.test-d.ts b/tests/foundry/client-esm/dice/dice/fate.test-d.ts
similarity index 100%
rename from tests/foundry/client/dice/dice/fate.test-d.ts
rename to tests/foundry/client-esm/dice/dice/fate.test-d.ts
diff --git a/tests/foundry/client-esm/dice/roll.test-d.ts b/tests/foundry/client-esm/dice/roll.test-d.ts
new file mode 100644
index 000000000..0b2a92e39
--- /dev/null
+++ b/tests/foundry/client-esm/dice/roll.test-d.ts
@@ -0,0 +1,60 @@
+import { expectTypeOf } from "vitest";
+import type { EmptyObject } from "../../../../src/types/utils.d.mts";
+
+class CustomRoll<D extends Record<string, unknown> = EmptyObject> extends Roll<D> {}
+
+CONFIG.Dice.rolls = [CustomRoll, Roll];
+
+const rollCls = CONFIG.Dice.rolls[0];
+
+expectTypeOf(rollCls.CHAT_TEMPLATE).toEqualTypeOf<string>();
+
+// Attack with advantage!
+const r = new Roll("2d20kh + @prof + @strMod", { prof: 2, strMod: 4 });
+
+// create the configured roll instance
+// TODO: Find way to ensure that first element of CONFIG.Dice.rolls array is used by `Roll.create`
+// expectTypeOf(Roll.create("1d20")).toEqualTypeOf<CustomRoll<EmptyObject>>();
+// expectTypeOf(Roll.create("1d20 + @prof", { prof: 2 })).toEqualTypeOf<CustomRoll<{ prof: number }>>();
+// expectTypeOf(Roll.fromTerms([])).toEqualTypeOf<Roll<EmptyObject>>();
+// expectTypeOf(CustomRoll.fromTerms([])).toEqualTypeOf<CustomRoll<EmptyObject>>();
+
+// The parsed terms of the roll formula
+// [Die, OperatorTerm, NumericTerm, OperatorTerm, NumericTerm]
+expectTypeOf(r.terms).toEqualTypeOf<foundry.dice.terms.RollTerm[]>();
+
+// Execute the roll
+type TypeOfR = Roll<{ prof: number; strMod: number }>;
+expectTypeOf(r.evaluate()).toEqualTypeOf<Promise<foundry.dice.Roll.Evaluated<TypeOfR>>>();
+expectTypeOf(r.evaluate({ minimize: true, maximize: true })).toEqualTypeOf<
+  Promise<foundry.dice.Roll.Evaluated<TypeOfR>>
+>();
+expectTypeOf((await r.evaluate()).total).toEqualTypeOf<number>();
+
+expectTypeOf(r.roll()).toEqualTypeOf<Promise<foundry.dice.Roll.Evaluated<TypeOfR>>>();
+expectTypeOf(r.roll()).toEqualTypeOf<Promise<foundry.dice.Roll.Evaluated<TypeOfR>>>();
+expectTypeOf(r.roll({ minimize: true, maximize: true })).toEqualTypeOf<Promise<foundry.dice.Roll.Evaluated<TypeOfR>>>();
+expectTypeOf((await r.roll()).total).toEqualTypeOf<number>();
+
+expectTypeOf(r.reroll()).toEqualTypeOf<Promise<foundry.dice.Roll.Evaluated<TypeOfR>>>();
+expectTypeOf(r.reroll({ minimize: true, maximize: true })).toEqualTypeOf<
+  Promise<foundry.dice.Roll.Evaluated<TypeOfR>>
+>();
+expectTypeOf((await r.reroll()).total).toEqualTypeOf<number>();
+
+// The resulting equation after it was rolled
+expectTypeOf(r.result).toEqualTypeOf<string>(); // 16 + 2 + 4
+
+// The total resulting from the roll
+expectTypeOf(r.total).toEqualTypeOf<number | undefined>(); // 22
+
+declare const testBool: boolean;
+
+expectTypeOf(r.toMessage()).toEqualTypeOf<Promise<ChatMessage | undefined>>();
+expectTypeOf(r.toMessage({}, { create: true })).toEqualTypeOf<Promise<ChatMessage | undefined>>();
+// eslint-disable-next-line @typescript-eslint/no-empty-object-type
+expectTypeOf(r.toMessage({}, { create: false })).toEqualTypeOf<Promise<foundry.dice.Roll.MessageData<{}>>>();
+expectTypeOf(r.toMessage({}, { create: testBool })).toEqualTypeOf<
+  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
+  Promise<ChatMessage | undefined | foundry.dice.Roll.MessageData<{}>>
+>();
diff --git a/tests/foundry/client/dice/term.test-d.ts b/tests/foundry/client-esm/dice/term.test-d.ts
similarity index 100%
rename from tests/foundry/client/dice/term.test-d.ts
rename to tests/foundry/client-esm/dice/term.test-d.ts
diff --git a/tests/foundry/client/core/settings.test-d.ts b/tests/foundry/client/core/settings.test-d.ts
index c80b68f5f..739934765 100644
--- a/tests/foundry/client/core/settings.test-d.ts
+++ b/tests/foundry/client/core/settings.test-d.ts
@@ -1,4 +1,5 @@
 import { expectTypeOf } from "vitest";
+import type { EmptyObject } from "../../../../src/types/utils.d.mts";
 
 const clientSettings = new ClientSettings([]);
 
@@ -64,13 +65,12 @@ clientSettings.register("some", "numberSetting", {
 clientSettings.register("some", "stringSetting", {
   scope: "world",
   type: String,
-  filePicker: "audio",
 });
 
 // core settings
 
 expectTypeOf(clientSettings.get("core", "combatTrackerConfig")).toEqualTypeOf<
-  { resource: string; skipDefeated: boolean } | {}
+  { resource: string; skipDefeated: boolean } | EmptyObject
 >();
 expectTypeOf(clientSettings.get("core", "compendiumConfiguration")).toEqualTypeOf<
   Partial<Record<string, CompendiumCollection.Configuration>>
diff --git a/tests/foundry/client/core/utils.test-d.ts b/tests/foundry/client/core/utils.test-d.ts
index db010174e..dd3502b80 100644
--- a/tests/foundry/client/core/utils.test-d.ts
+++ b/tests/foundry/client/core/utils.test-d.ts
@@ -1,5 +1,6 @@
 import { assertType } from "vitest";
+import type { AnyFunction } from "../../../../src/types/utils.d.mts";
 
 // prove that they are global
-assertType<Function>(saveDataToFile);
-assertType<Function>(readTextFromFile);
+assertType<AnyFunction>(saveDataToFile);
+assertType<AnyFunction>(readTextFromFile);
diff --git a/tests/foundry/client/dice/roll.test-d.ts b/tests/foundry/client/dice/roll.test-d.ts
deleted file mode 100644
index 003911ec0..000000000
--- a/tests/foundry/client/dice/roll.test-d.ts
+++ /dev/null
@@ -1,88 +0,0 @@
-import { expectTypeOf } from "vitest";
-import type { Evaluated, MessageData } from "../../../../src/foundry/client/dice/roll.d.mts";
-
-class CustomRoll<D extends object = {}> extends Roll<D> {}
-
-CONFIG.Dice.rolls = [CustomRoll, Roll];
-
-// Attack with advantage!
-const r = new Roll("2d20kh + @prof + @strMod", { prof: 2, strMod: 4 });
-
-// create the configured roll instance
-expectTypeOf(Roll.create("1d20")).toEqualTypeOf<CustomRoll<{}>>();
-expectTypeOf(Roll.create("1d20 + @prof", { prof: 2 })).toEqualTypeOf<CustomRoll<{ prof: number }>>();
-expectTypeOf(Roll.fromTerms([])).toEqualTypeOf<Roll<object>>();
-expectTypeOf(CustomRoll.fromTerms([])).toEqualTypeOf<CustomRoll<object>>();
-
-// The parsed terms of the roll formula
-// [Die, OperatorTerm, NumericTerm, OperatorTerm, NumericTerm]
-expectTypeOf(r.terms).toEqualTypeOf<RollTerm[]>();
-
-// Execute the roll
-type TypeOfR = Roll<{ prof: number; strMod: number }>;
-expectTypeOf(r.evaluate({ async: true })).toEqualTypeOf<Promise<Evaluated<TypeOfR>>>();
-expectTypeOf(r.evaluate({ async: false })).toEqualTypeOf<Evaluated<TypeOfR>>();
-expectTypeOf(r.evaluate()).toEqualTypeOf<Promise<Evaluated<TypeOfR>>>();
-expectTypeOf(r.evaluate({ minimize: true, maximize: true })).toEqualTypeOf<Evaluated<TypeOfR>>();
-expectTypeOf(r.evaluate({ minimize: true, maximize: true, async: false as boolean })).toEqualTypeOf<
-  Evaluated<TypeOfR> | Promise<Evaluated<TypeOfR>>
->();
-expectTypeOf(r.evaluate({ minimize: true, maximize: true, async: false as boolean | undefined })).toEqualTypeOf<
-  Evaluated<TypeOfR> | Promise<Evaluated<TypeOfR>>
->();
-expectTypeOf(r.evaluate({ minimize: true, maximize: true, async: false as false | undefined })).toEqualTypeOf<
-  Evaluated<TypeOfR>
->();
-expectTypeOf(r.evaluate({ minimize: true, maximize: true, async: false as true | undefined })).toEqualTypeOf<
-  Evaluated<TypeOfR> | Promise<Evaluated<TypeOfR>>
->();
-expectTypeOf((await r.evaluate()).total).toEqualTypeOf<number>();
-
-expectTypeOf(r.roll({ async: true })).toEqualTypeOf<Promise<Evaluated<TypeOfR>>>();
-expectTypeOf(r.roll({ async: false })).toEqualTypeOf<Evaluated<TypeOfR>>();
-expectTypeOf(r.roll()).toEqualTypeOf<Promise<Evaluated<TypeOfR>>>();
-expectTypeOf(r.roll({ minimize: true, maximize: true })).toEqualTypeOf<Evaluated<TypeOfR>>();
-expectTypeOf(r.roll({ minimize: true, maximize: true, async: false as boolean })).toEqualTypeOf<
-  Evaluated<TypeOfR> | Promise<Evaluated<TypeOfR>>
->();
-expectTypeOf(r.roll({ minimize: true, maximize: true, async: false as boolean | undefined })).toEqualTypeOf<
-  Evaluated<TypeOfR> | Promise<Evaluated<TypeOfR>>
->();
-expectTypeOf(r.roll({ minimize: true, maximize: true, async: false as false | undefined })).toEqualTypeOf<
-  Evaluated<TypeOfR>
->();
-expectTypeOf(r.roll({ minimize: true, maximize: true, async: false as true | undefined })).toEqualTypeOf<
-  Evaluated<TypeOfR> | Promise<Evaluated<TypeOfR>>
->();
-expectTypeOf((await r.roll()).total).toEqualTypeOf<number>();
-
-expectTypeOf(r.reroll({ async: true })).toEqualTypeOf<Promise<Evaluated<TypeOfR>>>();
-expectTypeOf(r.reroll({ async: false })).toEqualTypeOf<Evaluated<TypeOfR>>();
-expectTypeOf(r.reroll()).toEqualTypeOf<Promise<Evaluated<TypeOfR>>>();
-expectTypeOf(r.reroll({ minimize: true, maximize: true })).toEqualTypeOf<Evaluated<TypeOfR>>();
-expectTypeOf(r.reroll({ minimize: true, maximize: true, async: false as boolean })).toEqualTypeOf<
-  Evaluated<TypeOfR> | Promise<Evaluated<TypeOfR>>
->();
-expectTypeOf(r.reroll({ minimize: true, maximize: true, async: false as boolean | undefined })).toEqualTypeOf<
-  Evaluated<TypeOfR> | Promise<Evaluated<TypeOfR>>
->();
-expectTypeOf(r.reroll({ minimize: true, maximize: true, async: false as false | undefined })).toEqualTypeOf<
-  Evaluated<TypeOfR>
->();
-expectTypeOf(r.reroll({ minimize: true, maximize: true, async: false as true | undefined })).toEqualTypeOf<
-  Evaluated<TypeOfR> | Promise<Evaluated<TypeOfR>>
->();
-expectTypeOf((await r.reroll()).total).toEqualTypeOf<number>();
-
-// The resulting equation after it was rolled
-expectTypeOf(r.result).toEqualTypeOf<string>(); // 16 + 2 + 4
-
-// The total resulting from the roll
-expectTypeOf(r.total).toEqualTypeOf<number | undefined>(); // 22
-
-expectTypeOf(r.toMessage()).toEqualTypeOf<Promise<ChatMessage | undefined>>();
-expectTypeOf(r.toMessage({}, { create: true })).toEqualTypeOf<Promise<ChatMessage | undefined>>();
-expectTypeOf(r.toMessage({}, { create: false })).toEqualTypeOf<MessageData<{}>>();
-expectTypeOf(r.toMessage({}, { create: false as boolean })).toEqualTypeOf<
-  Promise<ChatMessage | undefined> | MessageData<{}>
->();
diff --git a/tests/foundry/common/data/fields.test-d.ts b/tests/foundry/common/data/fields.test-d.ts
index dd6cb442c..da160d525 100644
--- a/tests/foundry/common/data/fields.test-d.ts
+++ b/tests/foundry/common/data/fields.test-d.ts
@@ -50,18 +50,18 @@ if (myJournalEntryPage.system instanceof foundry.abstract.TypeDataModel) {
 /** EmbeddedDataField */
 
 declare const embeddedModel: foundry.data.LightData;
-declare const embeddedOptions: foundry.data.fields.EmbeddedDataField.Options<typeof embeddedModel>;
+declare type embeddedOptions = foundry.data.fields.EmbeddedDataField.Options<typeof embeddedModel>;
 declare const embeddedAssignment: foundry.data.fields.EmbeddedDataField.AssignmentType<
   typeof embeddedModel,
-  typeof embeddedOptions
+  embeddedOptions
 >;
 declare const embeddedInitialized: foundry.data.fields.EmbeddedDataField.InitializedType<
   typeof embeddedModel,
-  typeof embeddedOptions
+  embeddedOptions
 >;
 declare const embeddedPersisted: foundry.data.fields.EmbeddedDataField.PersistedType<
   typeof embeddedModel,
-  typeof embeddedOptions
+  embeddedOptions
 >;
 
 expectTypeOf(embeddedAssignment?.alpha).toEqualTypeOf<number | undefined | null>();
@@ -96,14 +96,14 @@ declare const AssignmentElementType: foundry.data.fields.EmbeddedCollectionField
 declare const InitializedElementType: foundry.data.fields.EmbeddedCollectionField.InitializedElementType<
   typeof ElementFieldType
 >;
-declare const EmbeddedCollectionOptions: foundry.data.fields.EmbeddedCollectionField.DefaultOptions<
+declare type EmbeddedCollectionOptions = foundry.data.fields.EmbeddedCollectionField.DefaultOptions<
   typeof AssignmentElementType
 >;
 declare const InitializedType: foundry.data.fields.EmbeddedCollectionField.InitializedType<
   typeof AssignmentElementType,
   typeof InitializedElementType,
   typeof ParentDataModel,
-  typeof EmbeddedCollectionOptions
+  EmbeddedCollectionOptions
 >;
 
 expectTypeOf(ElementFieldType.hasTypeData).toEqualTypeOf<boolean>();
diff --git a/tests/foundry/common/documents/actor.test-d.ts b/tests/foundry/common/documents/actor.test-d.ts
index 27c1d464c..eadb6538b 100644
--- a/tests/foundry/common/documents/actor.test-d.ts
+++ b/tests/foundry/common/documents/actor.test-d.ts
@@ -70,7 +70,7 @@ class MyCharacter extends foundry.abstract.TypeDataModel<MyCharacterSchema, Acto
     };
   }
 
-  override prepareDerivedData(this: Merge<DataModel<MyCharacterSchema, Actor.ConfiguredInstance>, {}>): void {
+  override prepareDerivedData(this: Merge<DataModel<MyCharacterSchema, Actor.ConfiguredInstance>, EmptyObject>): void {
     this.abilities.strength.value + 2;
     for (const ability of Object.values(this.abilities)) {
       // @ts-expect-error Derived data must be declared
diff --git a/tests/foundry/common/utils/helpers.mjs.test-d.ts b/tests/foundry/common/utils/helpers.mjs.test-d.ts
index 017413808..b9d7de23f 100644
--- a/tests/foundry/common/utils/helpers.mjs.test-d.ts
+++ b/tests/foundry/common/utils/helpers.mjs.test-d.ts
@@ -1,4 +1,5 @@
 import { expectTypeOf, assertType } from "vitest";
+import type { AnyFunction, NonNullish } from "../../../../src/types/utils.d.mts";
 
 // Global export test
 expectTypeOf(benchmark).toEqualTypeOf(foundry.utils.benchmark);
@@ -112,7 +113,7 @@ expectTypeOf(foundry.utils.duplicate(((): string | null => "")())).toEqualTypeOf
 
 expectTypeOf(foundry.utils.duplicate(((): string | undefined => "")())).toEqualTypeOf<string>();
 
-expectTypeOf(foundry.utils.duplicate(((): string | Function => "")())).toEqualTypeOf<string>();
+expectTypeOf(foundry.utils.duplicate(((): string | AnyFunction => "")())).toEqualTypeOf<string>();
 
 expectTypeOf(foundry.utils.duplicate(((): string | symbol => "")())).toEqualTypeOf<string>();
 
@@ -158,11 +159,11 @@ expectTypeOf(foundry.utils.duplicate({ a: ((): boolean => false)() })).toEqualTy
 
 expectTypeOf(foundry.utils.duplicate({ a: null })).toEqualTypeOf<{ a: null }>();
 
-expectTypeOf(foundry.utils.duplicate({ a: undefined })).toEqualTypeOf<{}>();
+expectTypeOf(foundry.utils.duplicate({ a: undefined })).toEqualTypeOf<NonNullish>();
 
-expectTypeOf(foundry.utils.duplicate({ a: () => 0 })).toEqualTypeOf<{}>();
+expectTypeOf(foundry.utils.duplicate({ a: () => 0 })).toEqualTypeOf<NonNullish>();
 
-expectTypeOf(foundry.utils.duplicate({ a: Symbol("") })).toEqualTypeOf<{}>();
+expectTypeOf(foundry.utils.duplicate({ a: Symbol("") })).toEqualTypeOf<NonNullish>();
 
 expectTypeOf(foundry.utils.duplicate({ a: ((): string | boolean => "")() })).toEqualTypeOf<{ a: string | boolean }>();
 
@@ -174,7 +175,7 @@ expectTypeOf(foundry.utils.duplicate({ a: ((): string | undefined => "")() })).t
   a?: string | undefined;
 }>();
 
-expectTypeOf(foundry.utils.duplicate({ a: ((): string | Function => "")() })).toEqualTypeOf<{
+expectTypeOf(foundry.utils.duplicate({ a: ((): string | AnyFunction => "")() })).toEqualTypeOf<{
   a?: string | undefined;
 }>();