Repository: League-of-Foundry-Developers/foundry-vtt-types
Pull request #2749 (2024-08-05 11:44:53)

ui/Filepicker and Dialog
Addresses #2677 and #2680


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..731fd5689 100644
--- a/src/foundry/client-esm/applications/api/document-sheet.d.mts
+++ b/src/foundry/client-esm/applications/api/document-sheet.d.mts
@@ -1,10 +1,9 @@
-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 {
-  export interface Configuration<
-    Document extends foundry.abstract.Document<any, any, any> = foundry.abstract.Document<any, any, any>,
-  > extends ApplicationV2.Configuration {
+  export interface Configuration<Document extends foundry.abstract.Document.Any = foundry.abstract.Document.Any>
+    extends ApplicationV2.Configuration {
     /**
      * The Document instance associated with this sheet
      */
@@ -39,8 +38,8 @@ declare namespace DocumentSheetV2 {
  * The Application class is responsible for rendering an HTMLElement into the Foundry Virtual Tabletop user interface.
  */
 declare class DocumentSheetV2<
-  Document extends foundry.abstract.Document<any, any, any>,
-  RenderContext extends Record<string, unknown> = Record<string, never>,
+  Document extends foundry.abstract.Document.Any,
+  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 +73,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/elements/prosemirror-editor.d.mts b/src/foundry/client-esm/applications/elements/prosemirror-editor.d.mts
index 70b44172d..aef24446b 100644
--- a/src/foundry/client-esm/applications/elements/prosemirror-editor.d.mts
+++ b/src/foundry/client-esm/applications/elements/prosemirror-editor.d.mts
@@ -1,4 +1,4 @@
-import type ProseMirrorPlugin from "../../../prosemirror/plugin.d.mts";
+import type ProseMirrorPlugin from "../../../common/prosemirror/plugin.d.mts";
 import type { FormInputConfig } from "../forms/fields.d.mts";
 import type AbstractFormInputElement from "./form-element.d.mts";
 
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..3ace05e95 100644
--- a/src/foundry/client-esm/client.d.mts
+++ b/src/foundry/client-esm/client.d.mts
@@ -10,7 +10,7 @@ import * as _documents from "../common/documents/_module.mjs";
 import * as _packages from "../common/packages/module.mjs";
 import * as _utils from "../common/utils/module.mjs";
 import * as _config from "../common/config.mjs";
-// import * as _prosemirror from "../common/prosemirror/_module.mjs";
+import * as _prosemirror from "../common/prosemirror/_module.mjs";
 // import * as _grid from "../common/grid/_module.mjs";
 // import * as _types from "../common/types.mjs";
 
@@ -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.
@@ -132,7 +133,7 @@ declare global {
     /**
      * A library for providing rich text editing using ProseMirror within the Foundry Virtual Tabletop game client.
      */
-    // export import prosemirror = _prosemirror;
+    export import prosemirror = _prosemirror;
 
     /**
      * Grid classes.
@@ -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/form.d.mts b/src/foundry/client/apps/form.d.mts
index dc87502a1..f3c89b3d5 100644
--- a/src/foundry/client/apps/form.d.mts
+++ b/src/foundry/client/apps/form.d.mts
@@ -1,7 +1,7 @@
 import type { EditorView } from "prosemirror-view";
 import type { Editor } from "tinymce";
 import type { GetDataReturnType, MaybePromise } from "../../../types/utils.d.mts";
-import type { ProseMirrorKeyMaps, ProseMirrorMenu } from "../../prosemirror/prosemirror.d.mts";
+import type { ProseMirrorKeyMaps, ProseMirrorMenu } from "../../common/prosemirror/_module.d.mts";
 
 declare global {
   interface FormApplicationOptions extends ApplicationOptions {
@@ -320,9 +320,8 @@ declare global {
     }
   }
 
-  interface DocumentSheetOptions<
-    ConcreteDocument extends foundry.abstract.Document<any, any, any> = foundry.abstract.Document<any, any, any>,
-  > extends FormApplicationOptions {
+  interface DocumentSheetOptions<ConcreteDocument extends foundry.abstract.Document.Any = foundry.abstract.Document.Any>
+    extends FormApplicationOptions {
     /**
      * The default permissions required to view this Document sheet.
      * @defaultValue {@link CONST.DOCUMENT_OWNERSHIP_LEVELS.LIMITED}
@@ -342,7 +341,7 @@ declare global {
    */
   abstract class DocumentSheet<
     Options extends DocumentSheetOptions<ConcreteDocument>,
-    ConcreteDocument extends foundry.abstract.Document<any, any, any> = foundry.abstract.Document<any, any, any>,
+    ConcreteDocument extends foundry.abstract.Document.Any = foundry.abstract.Document.Any,
   > extends FormApplication<Options, ConcreteDocument> {
     /**
      * @param object  - A Document instance which should be managed by this form.
@@ -449,7 +448,7 @@ declare global {
   namespace DocumentSheet {
     interface DocumentSheetData<
       Options extends DocumentSheetOptions<ConcreteDocument>,
-      ConcreteDocument extends foundry.abstract.Document<any, any, any> = foundry.abstract.Document<any, any, any>,
+      ConcreteDocument extends foundry.abstract.Document.Any = foundry.abstract.Document.Any,
     > extends FormApplication.FormApplicationData {
       cssClass: string;
       editable: boolean;
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/image-popout.d.mts b/src/foundry/client/apps/forms/image-popout.d.mts
index 55f0556b3..cc6db4bf0 100644
--- a/src/foundry/client/apps/forms/image-popout.d.mts
+++ b/src/foundry/client/apps/forms/image-popout.d.mts
@@ -78,7 +78,7 @@ declare global {
     /**
      * Provide a reference to the Document referenced by this popout, if one exists
      */
-    getRelatedObject(): Promise<foundry.abstract.Document<any, any, any> | null>;
+    getRelatedObject(): Promise<foundry.abstract.Document.Any | null>;
 
     protected override _render(force?: boolean, options?: Application.RenderOptions<Options>): Promise<void>;
 
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/forms/ownership.d.mts b/src/foundry/client/apps/forms/ownership.d.mts
index fbf704a0f..8b4654910 100644
--- a/src/foundry/client/apps/forms/ownership.d.mts
+++ b/src/foundry/client/apps/forms/ownership.d.mts
@@ -8,7 +8,7 @@ declare global {
    */
   class DocumentOwnershipConfig<
     Options extends DocumentSheetOptions<ConcreteDocument>,
-    ConcreteDocument extends foundry.abstract.Document<any, any, any> = foundry.abstract.Document<any, any, any>,
+    ConcreteDocument extends foundry.abstract.Document.Any = foundry.abstract.Document.Any,
   > extends DocumentSheet<Options, ConcreteDocument> {
     /**
      * @defaultValue
diff --git a/src/foundry/client/apps/forms/sheet-config.d.mts b/src/foundry/client/apps/forms/sheet-config.d.mts
index 9853f2b4d..bdc7e33b9 100644
--- a/src/foundry/client/apps/forms/sheet-config.d.mts
+++ b/src/foundry/client/apps/forms/sheet-config.d.mts
@@ -9,7 +9,7 @@ declare global {
    */
   class DocumentSheetConfig<
     Options extends FormApplicationOptions = FormApplicationOptions,
-    ConcreteDocument extends foundry.abstract.Document<any, any, any> = foundry.abstract.Document<any, any, any>,
+    ConcreteDocument extends foundry.abstract.Document.Any = foundry.abstract.Document.Any,
   > extends FormApplication<Options, ConcreteDocument> {
     /**
      * @defaultValue
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/document-index.d.mts b/src/foundry/client/core/document-index.d.mts
index e850af238..f01c04c1a 100644
--- a/src/foundry/client/core/document-index.d.mts
+++ b/src/foundry/client/core/document-index.d.mts
@@ -1,95 +1,8 @@
+import type { DOCUMENT_OWNERSHIP_LEVELS } from "../../common/constants.d.mts";
+
 export {};
 
 declare global {
-  /**
-   * A data structure for quickly retrieving objects by a string prefix.
-   * Note that this works well for languages with alphabets (latin, cyrillic, korean, etc.), but may need more nuanced
-   * handling for languages that compose characters and letters.
-   */
-  class WordTree {
-    /**
-     * Create a new node.
-     */
-    get node(): WordTree.Node;
-
-    /**
-     * Insert an entry into the tree.
-     * @param string - The string key for the entry.
-     * @param entry  - The entry to store.
-     * @returns The node the entry was added to.
-     */
-    addLeaf(string: string, entry: WordTree.Entry): WordTree.Node;
-
-    /**
-     * Return entries that match the given string prefix.
-     * @param prefix  - The prefix.
-     * @param options - Additional options to configure behaviour.
-     * @returns A number of entries that have the given prefix.
-     */
-    lookup(
-      prefix: string,
-      options?: {
-        /**
-         * The maximum number of items to retrieve. It is important to set this value as
-         * very short prefixes will naturally match large numbers of entries. (default: `10`)
-         */
-        limit: number;
-      },
-    ): WordTree.Entry[];
-
-    /**
-     * Returns the node at the given prefix.
-     * @param prefix - The prefix.
-     */
-    nodeAtPrefix(prefix: string): WordTree.Node;
-
-    /**
-     * Perform a breadth-first search starting from the given node and retrieving any entries along the way, until we
-     * reach the limit.
-     * @param node    - The starting node.
-     * @param entries - The accumulated entries.
-     * @param queue   - The working queue of nodes to search.
-     * @param options - Additional options for the search.
-     * @internal
-     */
-    protected _breadthFirstSearch(
-      node: WordTree.Node,
-      entries: WordTree.Entry[],
-      queue: WordTree.Node[],
-      options?: {
-        /** The maximum number of entries to retrieve before stopping. (default: `10`) */
-        limit: 10;
-      },
-    ): void;
-  }
-  export namespace WordTree {
-    /**
-     * A leaf entry in the tree.
-     */
-    interface Entry {
-      /** An object that this entry represents. */
-      entry: Document | object;
-
-      /** The document type. */
-      documentName: string;
-
-      /** The document's UUID. */
-      uuid: string;
-
-      /** The pack ID. */
-      pack?: string;
-    }
-
-    /**
-     * A word tree node consists of zero or more 1-character keys, and a leaves property that contains any objects that
-     * terminate at the current string prefix.
-     */
-    interface Node {
-      /** Any leaves at this node. */
-      leaves: Entry[];
-    }
-  }
-
   /**
    * This class is responsible for indexing all documents available in the world and storing them in a word tree structure
    * that allows for fast searching.
@@ -100,13 +13,13 @@ declare global {
      * A collection of WordTree structures for each document type.
      * @defaultValue `{}`
      */
-    trees: Record<string, WordTree>;
+    trees: Record<string, foundry.utils.WordTree>;
 
     /**
      * A reverse-lookup of a document's UUID to its parent node in the word tree.
      * @defaultValue `{}`
      */
-    uuids: Record<string, WordTree.Node>;
+    uuids: Record<string, foundry.utils.StringTree.StringTreeNode>;
 
     /**
      * Returns a Promise that resolves when the indexing process is complete.
@@ -122,7 +35,7 @@ declare global {
      * Return entries that match the given string prefix.
      * @param prefix  - The prefix.
      * @param options - Additional options to configure behaviour.
-     * A number of entries that have the given prefix, grouped by document type.
+     * @returns A number of entries that have the given prefix, grouped by document type.
      */
     lookup(
       prefix: string,
@@ -130,6 +43,7 @@ declare global {
         /**
          * The maximum number of items per document type to retrieve. It is important to set this
          * value as very short prefixes will naturally match large numbers of entries. (default: `10`)
+         * (default: `10`)
          */
         limit?: number;
         /**
@@ -137,26 +51,34 @@ declare global {
          * will be searched for. (default: `[]`)
          */
         documentTypes?: string[];
+        /**
+         * A filter function to apply to each candidate entry.
+         */
+        filterEntries?: foundry.utils.StringTree.StringTreeEntryFilter;
+        /**
+         * Only return entries that the user meets this ownership level for.
+         */
+        ownership?: DOCUMENT_OWNERSHIP_LEVELS;
       },
-    ): Record<string, WordTree.Entry[]>;
+    ): Record<string, foundry.utils.WordTree.WordTreeEntry[]>;
 
     /**
      * Add an entry to the index.
      * @param doc - The document entry.
      */
-    addDocument(doc: foundry.abstract.Document<any, any, any>): void;
+    addDocument(doc: foundry.abstract.Document.Any): void;
 
     /**
      * Remove an entry from the index.
      * @param doc - The document entry.
      */
-    removeDocument(doc: foundry.abstract.Document<any, any, any>): void;
+    removeDocument(doc: foundry.abstract.Document.Any): void;
 
     /**
      * Replace an entry in the index with an updated one.
      * @param doc - The document entry.
      */
-    replaceDocument(doc: foundry.abstract.Document<any, any, any>): void;
+    replaceDocument(doc: foundry.abstract.Document.Any): void;
 
     /**
      * Add a leaf node to the word tree index.
@@ -165,7 +87,7 @@ declare global {
      * @internal
      */
     protected _addLeaf(
-      doc: foundry.abstract.Document<any, any, any>,
+      doc: foundry.abstract.Document.Any,
       options?: {
         /** The compendium that the index belongs to. */
         pack?: CompendiumCollection<any>;
@@ -184,7 +106,7 @@ declare global {
      * @param parent - The parent document.
      * @internal
      */
-    protected _indexEmbeddedDocuments(parent: foundry.abstract.Document<any, any, any>): void;
+    protected _indexEmbeddedDocuments(parent: foundry.abstract.Document.Any): void;
 
     /**
      * Aggregate all documents and embedded documents in a world collection and add them to the index.
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 e712f6b3e..9d85e2623 100644
--- a/src/foundry/client/core/issues.d.mts
+++ b/src/foundry/client/core/issues.d.mts
@@ -1,119 +1,20 @@
 import type { DocumentConstructor, DocumentType } from "../../../types/helperTypes.d.mts";
+import type Document from "../../common/abstract/document.d.mts";
 import type { DataModelValidationError } from "../../common/data/validation-failure.d.mts";
 
 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>> {}
 
   /**
    * A class responsible for tracking issues in the current world.
    */
   class ClientIssues {
-    /**
-     * Keep track of valid Documents in the world that are using module-provided sub-types.
-     * @remarks the keys are module ids.
-     */
-    #moduleTypeMap: Map<string, ModuleSubTypeCounts>;
-
-    /**
-     * Keep track of document validation failures.
-     */
-    #documentValidationFailures: Record<
-      DocumentType,
-      Record<string, { name: string; error: DataModelValidationError }>
-    >;
-
-    /**
-     * Keep track of any usability issues related to browser or technology versions.
-     */
-    #usabilityIssues: Record<string, ClientIssues.UsabilityIssue>;
-
-    /** The minimum supported resolution. */
-    static #MIN_RESOLUTION: { WIDTH: 1024; HEIGHT: 700 };
-
-    /**
-     * The minimum supported client versions.
-     */
-    static #BROWSER_TESTS: {
-      /**
-       * @defaultValue
-       * ```typescript
-       * {
-       *   minimum: 24;
-       *   match: RegExp;
-       *   message: "ERROR.ElectronVersion";
-       * }
-       * ```
-       */
-      Electron: ClientIssues.BROWSER_TEST;
-      /**
-       * @defaultValue
-       * ```
-       * {
-       *   minimum: 92;
-       *   match: RegExp;
-       *   message: "ERROR.BrowserVersion";
-       * }
-       * ```
-       */
-      Chromium: ClientIssues.BROWSER_TEST;
-      /**
-       * @defaultValue
-       * ```
-       * {
-       *   minimum: 90;
-       *   match: RegExp;
-       *   message: "ERROR.BrowserVersion";
-       * }
-       * ```
-       */
-      Firefox: ClientIssues.BROWSER_TEST;
-      /**
-       * @defaultValue
-       * ```
-       * {
-       *   minimum: 15.4;
-       *   match: RegExp;
-       *   message: "ERROR.BrowserVersion";
-       * }
-       * ```
-       */
-      Safari: ClientIssues.BROWSER_TEST;
-    };
-
-    /**
-     * Add a Document to the count of module-provided sub-types.
-     * @param documentName      - The Document name.
-     * @param subType           - The Document's sub-type.
-     */
-    #countDocumentSubType(
-      documentName: DocumentType,
-      subType: string,
-      options?: {
-        /**
-         * Decrement the counter rather than incrementing it.
-         * @defaultValue `false`
-         */
-        decrement?: boolean;
-      },
-    ): void;
-
-    /**
-     * Detect the user's browser and display a notification if it is below the minimum required version.
-     */
-    #detectBrowserVersion(): void;
-
-    /**
-     * Record a reference to a resolution notification ID so that we can remove it if the problem is remedied.
-     */
-    #resolutionTooLowNotification: number;
-
-    /**
-     * Detect the user's resolution and display a notification if it is too small.
-     */
-    #detectResolution(): void;
+    // placeholder private member
+    #clientIssues: true;
 
     /**
      * Detect and display warnings for known performance issues which may occur due to the user's hardware or browser
@@ -124,21 +25,21 @@ declare global {
 
     /**
      * Add an invalid Document to the module-provided sub-type counts.
-     * @param documentName      - The Document name.
+     * @param cls               - The Document class.
      * @param source            - The Document's source data.
      * @internal
      *
      * @remarks official documentation says "invalid", but the document can be valid, it is simply not yet validated.
      */
     _countDocumentSubType(
-      documentName: DocumentType,
+      cls: Document.Any,
       source: unknown,
       options?: {
         /**
          * Decrement the counter rather than incrementing it.
          * @defaultValue `false`
          */
-        decrement?: boolean;
+        decrement?: boolean | undefined;
       },
     ): void;
 
@@ -189,17 +90,6 @@ declare global {
   }
 
   namespace ClientIssues {
-    interface BROWSER_TEST {
-      /** The minimum supported version for this browser. */
-      minimum: number;
-
-      /** A regular expression to match the browser against the user agent string. */
-      match: RegExp;
-
-      /** A message to display if the user's browser version does not meet the minimum. */
-      message: string;
-    }
-
     interface UsabilityIssue {
       /** The pre-localized message to display in relation to the usability issue. */
       message: string;
diff --git a/src/foundry/client/core/keybindings.d.mts b/src/foundry/client/core/keybindings.d.mts
index f3eb47963..92b990707 100644
--- a/src/foundry/client/core/keybindings.d.mts
+++ b/src/foundry/client/core/keybindings.d.mts
@@ -149,16 +149,18 @@ declare global {
      */
     static _compareActions(a: KeybindingAction, b: KeybindingAction): number;
 
-    /** Register core keybindings */
-    protected _registerCoreKeybindings(): void;
+    /**
+     * Register core keybindings.
+     * @param view           - The active game view
+     */
+    protected _registerCoreKeybindings(view: Game.View): void;
 
     /**
      * Handle Select all action
-     * @param event   - The originating keyboard event
      * @param context - The context data of the event
      * @internal
      */
-    protected static _onSelectAllObjects(event?: KeyboardEvent, context?: KeyboardEventContext): boolean;
+    protected static _onSelectAllObjects(context?: KeyboardEventContext): boolean;
 
     /**
      * Handle Cycle View actions
@@ -172,15 +174,14 @@ declare global {
      * @param context - The context data of the event
      * @internal
      */
-    protected static _onDismiss(context?: KeyboardEventContext): boolean;
+    protected static _onDismiss(context?: KeyboardEventContext): Promise<boolean>;
 
     /**
      * Open Character sheet for current token or controlled actor
-     * @param event   -
      * @param context - The context data of the event
      * @internal
      */
-    protected static _onToggleCharacterSheet(event?: KeyboardEvent, context?: KeyboardEventContext): ActorSheet | null;
+    protected static _onToggleCharacterSheet(context?: KeyboardEventContext): ReturnType<Game["toggleCharacterSheet"]>;
 
     /**
      * Handle action to target the currently hovered token.
@@ -191,11 +192,10 @@ declare global {
 
     /**
      * Handle DELETE Keypress Events
-     * @param event   - The originating keyboard event
      * @param context - The context data of the event
      * @internal
      */
-    protected static _onDelete(event: KeyboardEvent, context?: KeyboardEventContext): boolean;
+    protected static _onDelete(context?: KeyboardEventContext): boolean;
 
     /**
      * Handle keyboard movement once a small delay has elapsed to allow for multiple simultaneous key-presses.
diff --git a/src/foundry/client/core/keyboard.d.mts b/src/foundry/client/core/keyboard.d.mts
index d247ef40c..101a28ff6 100644
--- a/src/foundry/client/core/keyboard.d.mts
+++ b/src/foundry/client/core/keyboard.d.mts
@@ -50,7 +50,7 @@ declare global {
     static CONTROL_KEY_STRING: "⌘" | "Control";
 
     /**
-     * An special mapping of how special KeyboardEvent#code values should map to displayed strings or symbols.
+     * A special mapping of how special KeyboardEvent#code values should map to displayed strings or symbols.
      * Values in this configuration object override any other display formatting rules which may be applied.
      */
     static KEYCODE_DISPLAY_MAPPING: {
@@ -138,6 +138,13 @@ declare global {
      */
     isModifierActive(modifier: string): boolean;
 
+    /**
+     * Report whether a core action key is currently actively depressed.
+     * @param action       - The core action to verify (ex: "target")
+     * @returns              Is this core action key currently down (active)?
+     */
+    isCoreActionKeyActive(action: string): boolean;
+
     /**
      * Converts a Keyboard Context event into a string representation, such as "C" or "Control+C"
      * @param context          - The standardized context of the event
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/socket.d.mts b/src/foundry/client/core/socket.d.mts
index d6ad813ef..0b6246141 100644
--- a/src/foundry/client/core/socket.d.mts
+++ b/src/foundry/client/core/socket.d.mts
@@ -1,3 +1,5 @@
+import type { DatabaseOperationMap, DocumentSocketRequest } from "../../common/abstract/_types.d.mts";
+
 export {};
 
 declare global {
@@ -5,46 +7,12 @@ declare global {
     /**
      * Standardize the way that socket messages are dispatched and their results are handled
      * @param eventName - The socket event name being handled
-     * @param request   - Data provided to the Socket event
+     * @param request   - Request data provided to the Socket event
      * @returns A Promise which resolves to the SocketResponse
      */
-    static dispatch(eventName: string, request: SocketInterface.Request): Promise<SocketInterface.Response>;
-
-    /* -------------------------------------------- */
-
-    /**
-     * Handle an error returned from the database, displaying it on screen and in the console
-     * @param err - The provided Error message
-     */
-    protected static _handleError(err: Error): Error;
-  }
-
-  namespace SocketInterface {
-    namespace Requests {
-      interface ModifyEmbeddedDocument {
-        action: Action;
-        data: any; // TODO: add generics to this
-        options: any;
-        parentId: string;
-        parentType: string;
-        type: string;
-      }
-
-      // TODO: add remaining actions
-      type Action = "create" | "update" | "delete";
-    }
-
-    namespace Responses {
-      interface ModifyEmbeddedDocument {
-        request: Requests.ModifyEmbeddedDocument;
-        result: any[]; // TODO
-        userId: string;
-      }
-    }
-
-    // TODO: go through all SocketInterface.dispatch calls and collect requests
-    type Request = Requests.ModifyEmbeddedDocument;
-
-    type Response = Responses.ModifyEmbeddedDocument;
+    static dispatch<DatabaseAction extends keyof DatabaseOperationMap>(
+      eventName: string,
+      request: DocumentSocketRequest<DatabaseAction> | ManageCompendiumRequest,
+    ): Promise<SocketResponse>;
   }
 }
diff --git a/src/foundry/client/core/utils.d.mts b/src/foundry/client/core/utils.d.mts
index 5d8194736..0f71e7b4f 100644
--- a/src/foundry/client/core/utils.d.mts
+++ b/src/foundry/client/core/utils.d.mts
@@ -29,7 +29,7 @@ declare global {
       /** Allow retrieving an invalid Document. (default: `false`) */
       invalid?: boolean;
     },
-  ): Promise<foundry.abstract.Document<any, any, any> | null>;
+  ): Promise<foundry.abstract.Document.Any | null>;
 
   /**
    * Retrieve a Document by its Universally Unique Identifier (uuid) synchronously. If the uuid resolves to a compendium
@@ -49,7 +49,7 @@ declare global {
       /** Throw an error if the UUID cannot be resolved synchronously. (default: `true`) */
       strict?: boolean;
     },
-  ): foundry.abstract.Document<any, any, any> | Record<string, unknown> | null;
+  ): foundry.abstract.Document.Any | Record<string, unknown> | null;
 
   /**
    * Resolve a series of embedded document UUID parts against a parent Document.
@@ -58,10 +58,7 @@ declare global {
    * @returns The resolved Embedded Document.
    * @internal
    */
-  function _resolveEmbedded(
-    parent: foundry.abstract.Document<any, any, any>,
-    parts: string[],
-  ): foundry.abstract.Document<any, any, any>;
+  function _resolveEmbedded(parent: foundry.abstract.Document.Any, parts: string[]): foundry.abstract.Document.Any;
 
   /**
    * Return a reference to the Document class implementation which is configured for use.
diff --git a/src/foundry/client/core/workers.d.mts b/src/foundry/client/core/workers.d.mts
index bf2479834..eaed27ed8 100644
--- a/src/foundry/client/core/workers.d.mts
+++ b/src/foundry/client/core/workers.d.mts
@@ -10,12 +10,6 @@ declare global {
 
     /** The task action being performed, from WorkerManager.WORKER_TASK_ACTIONS */
     action: ValueOf<typeof WorkerManager.WORKER_TASK_ACTIONS>;
-
-    /** A Promise resolution handler */
-    resolve?: VoidFunction;
-
-    /** A Promise rejection handler */
-    reject?: VoidFunction;
   }
 
   /**
@@ -26,11 +20,6 @@ declare global {
   class AsyncWorker extends Worker {
     constructor(name: string, options?: Partial<AsyncWorker.Options>);
 
-    /**
-     * A Promise which resolves once the Worker is ready to accept tasks
-     */
-    ready: Promise<void>;
-
     name: string;
 
     /**
@@ -40,9 +29,9 @@ declare global {
     static WORKER_HARNESS_JS: string;
 
     /**
-     * A queue of active tasks that this Worker is executing.
+     * A Promise which resolves once the Worker is ready to accept tasks
      */
-    tasks: Map<number, WorkerTask>;
+    get ready(): Promise<void>;
 
     /**
      * An auto-incrementing task index.
@@ -58,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>;
 
     /**
@@ -70,15 +60,6 @@ declare global {
      * @returns A Promise which resolves with the returned result of the function once complete.
      */
     executeFunction(functionName: string, args?: any[], transfer?: any[]): Promise<unknown>;
-
-    /**
-     * Dispatch a task to a named Worker, awaiting confirmation of the result.
-     * @param taskData - Data to dispatch to the Worker as part of the task.
-     * @param transfer - An array of transferable objects which are transferred to the worker thread. (default: `[]`)
-     * @returns A Promise which wraps the task transaction.
-     * @internal
-     */
-    protected _dispatchTask(taskData?: WorkerTask, transfer?: any[]): Promise<unknown>;
   }
 
   /**
diff --git a/src/foundry/client/data/abstract/client-document.d.mts b/src/foundry/client/data/abstract/client-document.d.mts
index 233ebc2be..cdcccca5a 100644
--- a/src/foundry/client/data/abstract/client-document.d.mts
+++ b/src/foundry/client/data/abstract/client-document.d.mts
@@ -5,15 +5,9 @@ import type {
 } from "../../../../types/helperTypes.d.mts";
 import type { ConstructorOf, DeepPartial, InexactPartial, Mixin, ValueOf } from "../../../../types/utils.d.mts";
 import type Document from "../../../common/abstract/document.d.mts";
-import type { AnyMetadata, DocumentModificationOptions } from "../../../common/abstract/document.d.mts";
-
-declare class ClientDocument<
-  BaseDocument extends foundry.abstract.Document<any, AnyMetadata, any> = foundry.abstract.Document<
-    any,
-    AnyMetadata,
-    any
-  >,
-> {
+import type { DocumentModificationOptions } from "../../../common/abstract/document.d.mts";
+
+declare class ClientDocument<BaseDocument extends foundry.abstract.Document.Any = foundry.abstract.Document.Any> {
   /** @privateRemarks All mixin classses should accept anything for its constructor. */
   constructor(...args: any[]);
 
@@ -536,7 +530,7 @@ declare class ClientDocument<
    */
   protected _onCreateEmbeddedDocuments(
     embeddedName: string,
-    documents: foundry.abstract.Document<any, any, any>[],
+    documents: foundry.abstract.Document.Any[],
     result: Record<string, unknown>[],
     options: DocumentModificationOptions,
     userId: string,
@@ -568,7 +562,7 @@ declare class ClientDocument<
    */
   protected _onUpdateEmbeddedDocuments(
     embeddedName: string,
-    documents: foundry.abstract.Document<any, any, any>[],
+    documents: foundry.abstract.Document.Any[],
     result: Record<string, unknown>[],
     options: DocumentModificationContext,
     userId: string,
@@ -600,7 +594,7 @@ declare class ClientDocument<
    */
   protected _onDeleteEmbeddedDocuments(
     embeddedName: string,
-    documents: foundry.abstract.Document<any, any, any>[],
+    documents: foundry.abstract.Document.Any[],
     result: string[],
     options: DocumentModificationContext,
     userId: string,
@@ -688,12 +682,12 @@ declare global {
   }
 }
 
-export type DropData<T extends foundry.abstract.Document<any, any, any>> = T extends { id: string | undefined }
+export type DropData<T extends foundry.abstract.Document.Any> = T extends { id: string | undefined }
   ? DropData.Data<T> & DropData.UUID
   : DropData.Data<T>;
 
 declare namespace DropData {
-  interface Data<T extends foundry.abstract.Document<any, any, any>> {
+  interface Data<T extends foundry.abstract.Document.Any> {
     type: T["documentName"];
     data: T["_source"];
   }
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/data/documents/active-effect.d.mts b/src/foundry/client/data/documents/active-effect.d.mts
index 4b8de1ccc..ff4886369 100644
--- a/src/foundry/client/data/documents/active-effect.d.mts
+++ b/src/foundry/client/data/documents/active-effect.d.mts
@@ -32,7 +32,10 @@ declare global {
      * @throws An error if there is no status effect in `CONFIG.statusEffects` with the given status ID and if
      * the status has implicit statuses but doesn't have a static _id.
      */
-    static fromStatusEffect(statusId: string, options?: DocumentConstructionContext): Promise<ActiveEffect>;
+    static fromStatusEffect(
+      statusId: string,
+      options?: DocumentConstructionContext,
+    ): Promise<ActiveEffect.ConfiguredInstance>;
 
     /**
      * Create an ActiveEffect instance from status effect data.
@@ -46,7 +49,7 @@ declare global {
       statusId: string,
       effectData: ActiveEffectData,
       options?: DocumentConstructionContext,
-    ): Promise<ActiveEffect>;
+    ): Promise<ActiveEffect.ConfiguredInstance>;
 
     /* -------------------------------------------- */
     /*  Properties                                  */
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/hooks.d.mts b/src/foundry/client/hooks.d.mts
index 58308a0aa..aa7f02a25 100644
--- a/src/foundry/client/hooks.d.mts
+++ b/src/foundry/client/hooks.d.mts
@@ -10,8 +10,8 @@ import type { DeepPartial, ValueOf } from "../../types/utils.d.mts";
 import type { DropData } from "./data/abstract/client-document.d.mts";
 import type { DocumentModificationOptions } from "../common/abstract/document.d.mts";
 // eslint-disable-next-line import/no-named-as-default
-import type ProseMirrorMenu from "../prosemirror/menu.d.mts";
-import type { ProseMirrorDropDown } from "../prosemirror/menu.d.mts";
+import type ProseMirrorMenu from "../common/prosemirror/menu.d.mts";
+import type { ProseMirrorDropDown } from "../common/prosemirror/menu.d.mts";
 import type { OccludableObject } from "./pixi/placeables/primary-canvas-objects/occludable-object.d.mts";
 
 export {};
@@ -293,7 +293,7 @@ declare global {
        */
       updateCompendium: (
         pack: CompendiumCollection<any>,
-        documents: foundry.abstract.Document<any, any, any>[],
+        documents: foundry.abstract.Document.Any[],
         options: DocumentModificationOptions,
         userId: string,
       ) => void;
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/context.d.mts b/src/foundry/client/ui/context.d.mts
index ee438581f..dfdb9c57d 100644
--- a/src/foundry/client/ui/context.d.mts
+++ b/src/foundry/client/ui/context.d.mts
@@ -1,3 +1,6 @@
+import type { InexactPartial } from "../../../types/utils.d.mts";
+import type ApplicationV2 from "../../client-esm/applications/api/application.d.mts";
+
 export {};
 
 declare global {
@@ -16,17 +19,32 @@ declare global {
      * An identifier for a group this entry belongs to.
      * @defaultValue `_none`
      */
-    group?: string;
+    group?: string | undefined;
 
     /**
-     * The function to call when the menu item is clicked. Receives the HTML element of the SidebarTab entry that this context menu is for.
+     * The function to call when the menu item is clicked. Receives the HTML element
+     * of the entry that this context menu is for.
      */
     callback: (target: JQuery) => void;
 
     /**
-     * A function to call to determine if this item appears in the menu. Receives the HTML element of the SidebarTab entry that this context menu is for.
+     * A function to call or boolean value to determine if this entry
+     * appears in the menu.
      */
-    condition?: boolean | ((target: JQuery) => boolean);
+    condition?: boolean | ((target: JQuery) => boolean) | undefined;
+  }
+
+  /**
+   * @param html      - The HTML element of the context menu entry.
+   * @returns         whether the entry should be rendered in the context menu.
+   */
+  type ContextMenuCondition = (html: JQuery) => boolean;
+
+  namespace ContextMenu {
+    interface RenderOptions {
+      /** The event that triggered the context menu opening. */
+      event: PointerEvent;
+    }
   }
 
   /**
@@ -103,8 +121,8 @@ declare global {
      *                    (default: `"EntryContext"`)
      */
     static create(
-      app: Application,
-      html: JQuery,
+      app: Application | ApplicationV2,
+      html: JQuery | HTMLElement,
       selector: string,
       menuItems: ContextMenuEntry[],
       options?: ContextMenu.ConstructorOptions,
@@ -134,14 +152,18 @@ declare global {
      * Render the Context Menu by iterating over the menuItems it contains
      * Check the visibility of each menu item, and only render ones which are allowed by the item's logical condition
      * Attach a click handler to each item which is rendered
-     * @param target - The target element to which the context menu is attached
+     * @param target        - The target element to which the context menu is attached
+     * @param options       - (default: `{}`)
      */
-    render(target: JQuery): void | Promise<void>;
+    render(target: JQuery, options?: InexactPartial<ContextMenu.RenderOptions>): void | Promise<JQuery | void>;
 
     /**
      * Set the position of the context menu, taking into consideration whether the menu should expand upward or downward
+     * @param html            - The context menu element.
+     * @param target          - The element that the context menu was spawned on.
+     * @param options         - (default: `{}`)
      */
-    protected _setPosition(html: JQuery, target: JQuery): void;
+    protected _setPosition(html: JQuery, target: JQuery, options?: InexactPartial<ContextMenu.RenderOptions>): void;
 
     /**
      * Local listeners which apply to each ContextMenu instance which is created.
diff --git a/src/foundry/client/ui/filepicker.d.mts b/src/foundry/client/ui/filepicker.d.mts
index 8bcf2b941..ce0368773 100644
--- a/src/foundry/client/ui/filepicker.d.mts
+++ b/src/foundry/client/ui/filepicker.d.mts
@@ -1,8 +1,8 @@
-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 {
-    /** A type of file to target, in "audio", "image", "video", "imagevideo", "folder", "font", "graphics", "text", or "any" */
+    /** A type of file to target */
     type?: FilePicker.Type | undefined;
 
     /** The current file path being modified, if any */
@@ -47,6 +47,9 @@ declare global {
      */
     constructor(options?: Partial<Options>);
 
+    // placeholder private member
+    #filePicker: true;
+
     /**
      * The full requested path given by the user
      */
@@ -72,7 +75,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
@@ -102,6 +105,11 @@ declare global {
 
     protected _loaded: boolean;
 
+    /**
+     * The allowed values for the type of this FilePicker instance.
+     */
+    static FILE_TYPES: string[];
+
     /**
      * Record the last-browsed directory path so that re-opening a different FilePicker instance uses the same target
      * @defaultValue `""`
@@ -179,12 +187,6 @@ declare global {
      */
     protected _inferCurrentDirectory(target: string): [string, string];
 
-    /**
-     * Get the valid file extensions for a given named file picker type
-     * @internal
-     */
-    protected _getExtensions(type: FilePicker.Type): string[] | undefined;
-
     /**
      * Test a URL to see if it matches a well known s3 key pattern
      * @param url - An input URL to test
@@ -192,13 +194,6 @@ declare global {
      */
     static matchS3URL(url: string): RegExpMatchArray | null;
 
-    /**
-     * Parse a s3 key to learn the bucket and the key prefix used for the request
-     * @deprecated since v10, use `foundry.utils.parseS3URL` instead.
-     * @param key - A fully qualified key name or prefix path
-     */
-    static parseS3URL(key: string): { bucket: string | null; keyPrefix: string };
-
     override get title(): string;
 
     /**
@@ -232,7 +227,7 @@ declare global {
      * @param target - The target within the currently active source location.
      * @param options - Browsing options (default: `{}`)
      */
-    browse(target: string, options?: FilePicker.BrowseOptions): Promise<FilePicker.BrowseResult>;
+    browse(target?: string, options?: FilePicker.BrowseOptions): Promise<FilePicker.BrowseResult>;
 
     /**
      * Browse files for a certain directory location
@@ -272,26 +267,6 @@ declare global {
       options?: FilePicker.CreateDirectoryOptions,
     ): Promise<string>;
 
-    /**
-     * General dispatcher method to submit file management commands to the server
-     * @internal
-     * @param data    - Request data dispatched to the server
-     * @param options - Options dispatched to the server
-     * @returns The server response
-     */
-    protected static _manageFiles(
-      data: FilePicker.BrowseFilesData,
-      options?: FilePicker.BrowseOptions,
-    ): Promise<FilePicker.BrowseResult>;
-    protected static _manageFiles(
-      data: FilePicker.ConfigurePathData,
-      options?: FilePicker.ConfigurePathOptions,
-    ): Promise<FilePicker.ConfigurePathResult>;
-    protected static _manageFiles(
-      data: FilePicker.CreateDirectoryData,
-      options?: FilePicker.CreateDirectoryOptions,
-    ): Promise<string>;
-
     /**
      * Dispatch a POST request to the server containing a directory path and a file to upload
      * @param source  - The data source to which the file should be uploaded
@@ -309,12 +284,13 @@ 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
-     * @param packageId  - The id of the package to which the file should be uploaded. Only supports Systems and Modules.
-     * @param path       - The relative path in the package's storage directory the file should be uploaded to
+     * @param packageId  - The id of the package to which the file should be uploaded.
+     *                     Only supports Systems and Modules.
+     * @param path       - The relative destination path in the package's storage directory
      * @param file       - The File object to upload
      * @param body       - Additional file upload options sent in the POST body
      *                     (default: `{}`)
@@ -328,7 +304,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
@@ -337,13 +313,6 @@ declare global {
 
     override activateListeners(html: JQuery): void;
 
-    /**
-     * Handle a click event to change the display mode of the File Picker
-     * @param event - The triggering click event
-     * @internal
-     */
-    protected _onChangeDisplayMode(event: JQuery.ClickEvent): void;
-
     protected override _onChangeTab(event: MouseEvent | null, tabs: Tabs, active: this["activeSource"]): void;
 
     protected override _canDragStart(selector: string | null): boolean;
@@ -357,53 +326,6 @@ declare global {
      */
     protected override _onDrop(event: DragEvent): void;
 
-    /**
-     * Handle user submission of the address bar to request an explicit target
-     * @param event - The originating keydown event
-     * @internal
-     */
-    protected _onRequestTarget(event: KeyboardEvent): void;
-
-    /**
-     * Handle user interaction with the favorites
-     * @param event - The originating click event
-     */
-    protected _onClickFavorites(event: MouseEvent): Promise<void>;
-
-    /**
-     * Handle requests from the IntersectionObserver to lazily load an image file
-     * @internal
-     */
-    protected _onLazyLoadImages(...args: Parameters<SidebarTab["_onLazyLoadImage"]>): void;
-
-    /**
-     * Handle file or folder selection within the file picker
-     * @param event - The originating click event
-     * @internal
-     */
-    protected _onPick(event: JQuery.ClickEvent): void;
-
-    /**
-     * Handle backwards navigation of the fol6der structure.
-     * @param event - The triggering click event
-     * @internal
-     */
-    protected _onClickDirectoryControl(event: PointerEvent): void;
-
-    /**
-     * Present the user with a dialog to create a subdirectory within their currently browsed file storage location.
-     * @param source - The data source being browsed
-     * @internal
-     */
-    protected _createDirectoryDialog(source: FilePicker.Source): void;
-
-    /**
-     * Handle changes to the bucket selector
-     * @param event - The S3 bucket select change event
-     * @internal
-     */
-    protected _onChangeBucket(event: Event): void;
-
     /**
      * Handle changes to the tile size.
      * @param event - The triggering event.
@@ -414,13 +336,6 @@ declare global {
 
     protected _onSubmit(ev: Event): void;
 
-    /**
-     * Handle file upload
-     * @param ev - The file upload event
-     * @internal
-     */
-    protected _onUpload(ev: Event): void;
-
     /**
      * Bind the file picker to a new target field.
      * Assumes the user will provide a <button> HTMLElement which has the data-target and data-type attributes
@@ -447,19 +362,19 @@ declare global {
       /**
        * A bucket within which to search, if using the S3 source
        */
-      bucket?: string;
+      bucket?: string | undefined;
 
       /**
        * An Array of file extensions to filter on
        * @defaultValue `[]` (do not filter on extension)
        */
-      extensions?: string[];
+      extensions?: string[] | undefined;
 
       /**
        * The requested dir represents a wildcard path
        * @defaultValue false
        */
-      wildcard?: boolean;
+      wildcard?: boolean | undefined;
     }
 
     type Callback = (path: string) => void;
@@ -490,7 +405,7 @@ declare global {
       /**
        * @defaultValue `""`
        */
-      bucket?: string | null;
+      bucket?: string | null | undefined;
     }
 
     type SourceType = "data" | "public" | "s3";
@@ -535,7 +450,7 @@ declare global {
       };
     }
 
-    type Type = "any" | "audio" | "image" | "video" | "imagevideo" | "folder" | "font" | "graphics" | "text";
+    type Type = "image" | "audio" | "video" | "text" | "imagevideo" | "font" | "folder" | "any";
 
     interface UploadBody {
       /**
diff --git a/src/foundry/client/ui/forms.d.mts b/src/foundry/client/ui/forms.d.mts
index c8a38a79b..4b1259e2e 100644
--- a/src/foundry/client/ui/forms.d.mts
+++ b/src/foundry/client/ui/forms.d.mts
@@ -57,12 +57,6 @@ declare global {
      * @param value - The value to append to the form data
      */
     override append(name: string, value: any): void;
-
-    /**
-     * Export the FormData as an object
-     * @deprecated since v10, use `FormDataExtended#object` instead.
-     */
-    toObject(): FormDataExtended["object"];
   }
 }
 
@@ -84,7 +78,7 @@ declare namespace FormDataExtended {
      */
     disabled?: boolean;
     /** Include readonly fields?
-     * (default: `false`)
+     * (default: `true`)
      */
     readonly?: boolean;
   }
diff --git a/src/foundry/client/ui/notifications.d.mts b/src/foundry/client/ui/notifications.d.mts
index 21307dff6..b35b13f75 100644
--- a/src/foundry/client/ui/notifications.d.mts
+++ b/src/foundry/client/ui/notifications.d.mts
@@ -59,7 +59,7 @@ declare global {
      *                    (default: `"info"`)
      * @param options   - Additional options which affect the notification
      *                    (default: `{}`)
-     * @returns The ID of the notification
+     * @returns The ID of the notification (positive integer)
      */
     notify(message: string, type?: "info" | "warning" | "error", options?: Notifications.NotifyOptions): number;
 
@@ -67,7 +67,7 @@ declare global {
      * Display a notification with the "info" type
      * @param message - The content of the notification message
      * @param options - Notification options passed to the notify function
-     * @returns The ID of the notification
+     * @returns The ID of the notification (positive integer)
      */
     info(message: string, options?: Notifications.NotifyOptions): number;
 
@@ -75,7 +75,7 @@ declare global {
      * Display a notification with the "warning" type
      * @param message - The content of the notification message
      * @param options - Notification options passed to the notify function
-     * @returns The ID of the notification
+     * @returns The ID of the notification (positive integer)
      */
     warn(message: string, options?: Notifications.NotifyOptions): number;
 
@@ -83,7 +83,7 @@ declare global {
      * Display a notification with the "error" type
      * @param message - The content of the notification message
      * @param options - Notification options passed to the notify function
-     * @returns The ID of the notification
+     * @returns The ID of the notification (positive integer)
      */
     error(message: string, options?: Notifications.NotifyOptions): number;
 
diff --git a/src/foundry/client/ui/secrets.d.mts b/src/foundry/client/ui/secrets.d.mts
index 1f80f9c2a..af72d6cf0 100644
--- a/src/foundry/client/ui/secrets.d.mts
+++ b/src/foundry/client/ui/secrets.d.mts
@@ -13,11 +13,11 @@ declare global {
    * @returns The updated Document.
    */
   type HTMLSecretUpdateCallback<
-    ConcreteDocument extends foundry.abstract.Document<any, any, any> = foundry.abstract.Document<any, any, any>,
+    ConcreteDocument extends foundry.abstract.Document.Any = foundry.abstract.Document.Any,
   > = (secret: HTMLElement, content: string) => Promise<ConcreteDocument>;
 
   interface HTMLSecretConfiguration<
-    ConcreteDocument extends foundry.abstract.Document<any, any, any> = foundry.abstract.Document<any, any, any>,
+    ConcreteDocument extends foundry.abstract.Document.Any = foundry.abstract.Document.Any,
   > {
     /** The CSS selector used to target content that contains secret blocks. */
     parentSelector: string;
@@ -44,9 +44,7 @@ declare global {
    * secrets.bind(html);
    * ```
    */
-  class HTMLSecret<
-    ConcreteDocument extends foundry.abstract.Document<any, any, any> = foundry.abstract.Document<any, any, any>,
-  > {
+  class HTMLSecret<ConcreteDocument extends foundry.abstract.Document.Any = foundry.abstract.Document.Any> {
     /**
      * @param config - Configuration options.
      */
diff --git a/src/foundry/common/abstract/embedded-collection-delta.d.mts b/src/foundry/common/abstract/embedded-collection-delta.d.mts
index 0d67ff162..62b0bd394 100644
--- a/src/foundry/common/abstract/embedded-collection-delta.d.mts
+++ b/src/foundry/common/abstract/embedded-collection-delta.d.mts
@@ -6,8 +6,8 @@ import type EmbeddedCollection from "./embedded-collection.d.mts";
  * embedded collection, and generate new embedded Documents by combining them.
  */
 export default class EmbeddedCollectionDelta<
-  ContainedDocument extends foundry.abstract.Document<any, any, any>,
-  ParentDataModel extends foundry.abstract.Document<any, any, any>,
+  ContainedDocument extends foundry.abstract.Document.Any,
+  ParentDataModel extends foundry.abstract.Document.Any,
 > extends EmbeddedCollection<ContainedDocument, ParentDataModel> {
   /**
    * A convenience getter to return the corresponding base collection.
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/prosemirror/prosemirror.d.mts b/src/foundry/common/prosemirror/_module.d.mts
similarity index 83%
rename from src/foundry/prosemirror/prosemirror.d.mts
rename to src/foundry/common/prosemirror/_module.d.mts
index 3fda11e1e..75c16da98 100644
--- a/src/foundry/prosemirror/prosemirror.d.mts
+++ b/src/foundry/common/prosemirror/_module.d.mts
@@ -1,25 +1,28 @@
-import * as collab from "prosemirror-collab";
-import { keymap } from "prosemirror-keymap";
-import { DOMParser, DOMSerializer, Schema } from "prosemirror-model";
-import type { Plugin, PluginKey } from "prosemirror-state";
-import { AllSelection, TextSelection, EditorState } from "prosemirror-state";
-import { Step } from "prosemirror-transform";
+import { EditorState, AllSelection, TextSelection, Plugin, PluginKey } from "prosemirror-state";
 import { EditorView } from "prosemirror-view";
-import type ProseMirrorContentLinkPlugin from "./content-link-plugin.d.mts";
-import type ProseMirrorDirtyPlugin from "./dirty-plugin.d.mts";
-import "./extensions.d.mts";
-import type ProseMirrorImagePlugin from "./image-plugin.d.mts";
+import { Schema, DOMSerializer } from "prosemirror-model";
 // eslint-disable-next-line import/no-named-as-default
 import type ProseMirrorInputRules from "./input-rules.d.mts";
+import { keymap } from "prosemirror-keymap";
 // eslint-disable-next-line import/no-named-as-default
 import type ProseMirrorKeyMaps from "./keymaps.d.mts";
 // eslint-disable-next-line import/no-named-as-default
 import type ProseMirrorMenu from "./menu.d.mts";
-import type { schema as defaultSchema } from "./schema.d.mts";
+import "./extensions.d.mts";
+import * as collab from "prosemirror-collab";
+import type { Step } from "prosemirror-transform";
 import type { parseHTMLString, serializeHTMLString } from "./util.d.mts";
+
+// A const is being imported here. It can't be `import type`.
+// eslint-disable-next-line import/extensions
+import { schema as defaultSchema } from "./schema.mjs";
 import type ProseMirrorPlugin from "./plugin.d.mts";
+import type ProseMirrorImagePlugin from "./image-plugin.d.mts";
+import type ProseMirrorDirtyPlugin from "./dirty-plugin.d.mts";
+import type ProseMirrorContentLinkPlugin from "./content-link-plugin.d.mts";
 import type ProseMirrorHighlightMatchesPlugin from "./highlight-matches-plugin.d.mts";
 import type ProseMirrorClickHandler from "./click-handler.d.mts";
+import type DOMParser from "./dom-parser.d.mts";
 
 declare const dom: {
   parser: DOMParser;
@@ -31,7 +34,6 @@ declare const dom: {
 declare const defaultPlugins: Record<
   | "inputRules"
   | "keyMaps"
-  | "images"
   | "menu"
   | "isDirty"
   | "clickHandler"
diff --git a/src/foundry/prosemirror/click-handler.d.mts b/src/foundry/common/prosemirror/click-handler.d.mts
similarity index 100%
rename from src/foundry/prosemirror/click-handler.d.mts
rename to src/foundry/common/prosemirror/click-handler.d.mts
diff --git a/src/foundry/prosemirror/content-link-plugin.d.mts b/src/foundry/common/prosemirror/content-link-plugin.d.mts
similarity index 70%
rename from src/foundry/prosemirror/content-link-plugin.d.mts
rename to src/foundry/common/prosemirror/content-link-plugin.d.mts
index 5de754136..432bdb763 100644
--- a/src/foundry/prosemirror/content-link-plugin.d.mts
+++ b/src/foundry/common/prosemirror/content-link-plugin.d.mts
@@ -3,14 +3,6 @@ import type { Plugin } from "prosemirror-state";
 import type { EditorView } from "prosemirror-view";
 import type ProseMirrorPlugin from "./plugin.d.mts";
 
-interface ProseMirrorContentLinkOptions {
-  /** The parent document housing this editor. */
-  document?: foundry.abstract.Document<any, any, any>;
-  /** @defaultValue `false` */
-  relativeLinks?: boolean;
-}
-
-export default ProseMirrorContentLinkPlugin;
 /**
  * A class responsible for handling the dropping of Documents onto the editor and creating content links for them.
  */
@@ -19,19 +11,19 @@ declare class ProseMirrorContentLinkPlugin extends ProseMirrorPlugin {
    * @param schema  - The ProseMirror schema.
    * @param options - Additional options to configure the plugin's behaviour.
    */
-  constructor(schema: Schema, options?: ProseMirrorContentLinkOptions);
+  constructor(schema: Schema, options?: ProseMirrorContentLinkPlugin.ProseMirrorContentLinkOptions);
 
   /**
    * The parent document housing this editor.
    */
-  readonly document: foundry.abstract.Document<any, any, any>;
+  readonly document: foundry.abstract.Document.Any;
 
   /**
    * Whether to generate links relative to the parent document.
    */
   readonly relativeLinks: boolean;
 
-  static override build(schema: Schema, options?: ProseMirrorContentLinkOptions): Plugin;
+  static override build(schema: Schema, options?: ProseMirrorContentLinkPlugin.ProseMirrorContentLinkOptions): Plugin;
 
   /**
    * Handle a drop onto the editor.
@@ -42,3 +34,14 @@ declare class ProseMirrorContentLinkPlugin extends ProseMirrorPlugin {
    */
   protected _onDrop(view: EditorView, event: DragEvent, slice: Slice, moved: boolean): void | true;
 }
+
+declare namespace ProseMirrorContentLinkPlugin {
+  interface ProseMirrorContentLinkOptions {
+    /** The parent document housing this editor. */
+    document?: foundry.abstract.Document.Any | undefined;
+    /** @defaultValue `false` */
+    relativeLinks?: boolean | undefined;
+  }
+}
+
+export default ProseMirrorContentLinkPlugin;
diff --git a/src/foundry/prosemirror/dirty-plugin.d.mts b/src/foundry/common/prosemirror/dirty-plugin.d.mts
similarity index 86%
rename from src/foundry/prosemirror/dirty-plugin.d.mts
rename to src/foundry/common/prosemirror/dirty-plugin.d.mts
index d0afe44cc..79dd26328 100644
--- a/src/foundry/prosemirror/dirty-plugin.d.mts
+++ b/src/foundry/common/prosemirror/dirty-plugin.d.mts
@@ -1,7 +1,7 @@
 import type { Schema } from "prosemirror-model";
 import type { Plugin } from "prosemirror-state";
 import type ProseMirrorPlugin from "./plugin.d.mts";
-import type { EmptyObject } from "../../types/utils.d.mts";
+import type { EmptyObject } from "../../../types/utils.d.mts";
 
 export default ProseMirrorDirtyPlugin;
 
diff --git a/src/foundry/prosemirror/dom-parser.d.mts b/src/foundry/common/prosemirror/dom-parser.d.mts
similarity index 100%
rename from src/foundry/prosemirror/dom-parser.d.mts
rename to src/foundry/common/prosemirror/dom-parser.d.mts
diff --git a/src/foundry/prosemirror/dropdown.d.mts b/src/foundry/common/prosemirror/dropdown.d.mts
similarity index 93%
rename from src/foundry/prosemirror/dropdown.d.mts
rename to src/foundry/common/prosemirror/dropdown.d.mts
index 9037900d4..66cedd48e 100644
--- a/src/foundry/prosemirror/dropdown.d.mts
+++ b/src/foundry/common/prosemirror/dropdown.d.mts
@@ -18,6 +18,9 @@ declare class ProseMirrorDropDown {
    */
   constructor(title: string, items: ProseMirrorDropDownMenu.Entry[], options?: Options);
 
+  // placeholder private attribute to limit what can count as a subtype at compile time
+  #proseMirrorDropDown: true;
+
   /**
    * The default title for this drop-down.
    */
diff --git a/src/foundry/prosemirror/extensions.d.mts b/src/foundry/common/prosemirror/extensions.d.mts
similarity index 100%
rename from src/foundry/prosemirror/extensions.d.mts
rename to src/foundry/common/prosemirror/extensions.d.mts
diff --git a/src/foundry/common/prosemirror/highlight-matches-plugin.d.mts b/src/foundry/common/prosemirror/highlight-matches-plugin.d.mts
new file mode 100644
index 000000000..b76f59d4c
--- /dev/null
+++ b/src/foundry/common/prosemirror/highlight-matches-plugin.d.mts
@@ -0,0 +1,82 @@
+import { Schema } from "prosemirror-model";
+import type ProseMirrorPlugin from "./plugin.d.mts";
+import type { ProseMirrorMenu } from "./menu.d.mts";
+import { EditorState, Plugin } from "prosemirror-state";
+import { EditorView } from "prosemirror-view";
+import type { EmptyObject, InexactPartial } from "../../../types/utils.d.mts";
+
+declare namespace ProseMirrorHighlightMatchesPlugin {
+  /**
+   * A class responsible for handling the display of automated link recommendations when a user highlights text in a
+   * ProseMirror editor.
+   */
+  class PossibleMatchesTooltip {
+    /**
+     * @param view - The editor view
+     */
+    constructor(view: EditorView);
+
+    /**
+     * A reference to any existing tooltip that has been generated as part of a highlight match.
+     */
+    tooltip: HTMLElement;
+
+    update(view: EditorView, lastState: EditorState): Promise<void>;
+
+    /**
+     * Create a locked tooltip at the given position
+     * @param position - A position object with coordinates for where the tooltip should be placed
+     * @param text     - Explicit tooltip text or HTML to display.
+     * @param options  - Additional options which can override tooltip behavior.
+     */
+    _createTooltip(
+      position: InexactPartial<{
+        /** Explicit top position for the tooltip */
+        top?: string;
+        /** Explicit right position for the tooltip */
+        right?: string;
+        /** Explicit bottom position for the tooltip */
+        bottom?: string;
+        /** Explicit left position for the tooltip */
+        left?: string;
+      }>,
+      text: string,
+      options?: {
+        /** An optional, space-separated list of CSS classes to apply to the activated tooltip. */
+        cssClass: string;
+      },
+    ): void;
+
+    /**
+     * Update the tooltip with new HTML
+     * @param html - The HTML to be included in the tooltip
+     */
+    _updateTooltip(html: string): void;
+
+    /**
+     * Dismiss all locked tooltips and set this tooltip to undefined.
+     */
+    _deactivateTooltip(): void;
+
+    /**
+     * Find all Documents in the world/compendia with names that match the selection insensitive to case.
+     * @param text - A string which will be matched against document names
+     */
+    _findMatches(text: string): string;
+  }
+}
+
+/**
+ * A ProseMirrorPlugin wrapper around the {@link PossibleMatchesTooltip} class.
+ */
+declare class ProseMirrorHighlightMatchesPlugin extends ProseMirrorPlugin {
+  /**
+   * @param schema  - The ProseMirror schema.
+   * @param options - Additional options to configure the plugin's behaviour.
+   */
+  constructor(schema: Schema, options: ProseMirrorMenu.ProseMirrorMenuOptions);
+
+  static override build(schema: Schema, options?: EmptyObject): Plugin;
+}
+
+export default ProseMirrorHighlightMatchesPlugin;
diff --git a/src/foundry/prosemirror/image-plugin.d.mts b/src/foundry/common/prosemirror/image-plugin.d.mts
similarity index 93%
rename from src/foundry/prosemirror/image-plugin.d.mts
rename to src/foundry/common/prosemirror/image-plugin.d.mts
index 5642ff9f4..8dd462247 100644
--- a/src/foundry/prosemirror/image-plugin.d.mts
+++ b/src/foundry/common/prosemirror/image-plugin.d.mts
@@ -2,16 +2,14 @@ import type { Schema, Slice } from "prosemirror-model";
 import type { Plugin } from "prosemirror-state";
 import type { EditorView } from "prosemirror-view";
 import type ProseMirrorPlugin from "./plugin.d.mts";
-import type { EmptyObject } from "../../types/utils.d.mts";
+import type { EmptyObject } from "../../../types/utils.d.mts";
 
 export default ProseMirrorImagePlugin;
 /**
  * A class responsible for handle drag-and-drop and pasting of image content. Ensuring no base64 data is injected
  * directly into the journal content and it is instead uploaded to the user's data directory.
  */
-declare class ProseMirrorImagePlugin<
-  RelatedDocument extends foundry.abstract.Document<any, any, any>,
-> extends ProseMirrorPlugin {
+declare class ProseMirrorImagePlugin<RelatedDocument extends foundry.abstract.Document.Any> extends ProseMirrorPlugin {
   /**
    * @param schema   - The ProseMirror schema.
    * @param options  - Additional options to configure the plugin's behaviour.
diff --git a/src/foundry/prosemirror/index.d.mts b/src/foundry/common/prosemirror/index.d.mts
similarity index 90%
rename from src/foundry/prosemirror/index.d.mts
rename to src/foundry/common/prosemirror/index.d.mts
index 495d1c415..0b9daa773 100644
--- a/src/foundry/prosemirror/index.d.mts
+++ b/src/foundry/common/prosemirror/index.d.mts
@@ -11,7 +11,7 @@ import "./keymaps.d.mts";
 import "./menu.d.mts";
 import "./paste-transformer.d.mts";
 import "./plugin.d.mts";
-import type * as ProseMirrorObject from "./prosemirror.d.mts";
+import type * as ProseMirrorObject from "./_module.d.mts";
 import "./schema/index.d.mts";
 import "./schema.d.mts";
 import "./string-serializer.d.mts";
diff --git a/src/foundry/prosemirror/input-rules.d.mts b/src/foundry/common/prosemirror/input-rules.d.mts
similarity index 85%
rename from src/foundry/prosemirror/input-rules.d.mts
rename to src/foundry/common/prosemirror/input-rules.d.mts
index 0f8ff1fa0..fa6b1a02f 100644
--- a/src/foundry/prosemirror/input-rules.d.mts
+++ b/src/foundry/common/prosemirror/input-rules.d.mts
@@ -1,11 +1,10 @@
 import type { InputRule } from "prosemirror-inputrules";
 import type { Schema } from "prosemirror-model";
 import type { Plugin } from "prosemirror-state";
-import type { Options } from "../client/dice/roll.d.mts";
 import type ProseMirrorPlugin from "./plugin.d.mts";
 
 export declare namespace ProseMirrorInputRules {
-  export interface Options {
+  export interface ProseMirrorInputRulesOptions {
     /**
      * The minimum heading level to start from when generating heading input rules.
      * The resulting heading level for a heading rule is equal to the number of
@@ -26,7 +25,7 @@ declare class ProseMirrorInputRules extends ProseMirrorPlugin {
    * @param schema  - The ProseMirror schema to build the plugin against.
    * @param options - Additional options to pass to the plugin.
    * */
-  static build(schema: Schema, options?: ProseMirrorInputRules.Options): Plugin;
+  static build(schema: Schema, options?: ProseMirrorInputRules.ProseMirrorInputRulesOptions): Plugin;
 
   /**
    * Build input rules for node types present in the schema.
diff --git a/src/foundry/prosemirror/keymaps.d.mts b/src/foundry/common/prosemirror/keymaps.d.mts
similarity index 100%
rename from src/foundry/prosemirror/keymaps.d.mts
rename to src/foundry/common/prosemirror/keymaps.d.mts
diff --git a/src/foundry/prosemirror/menu.d.mts b/src/foundry/common/prosemirror/menu.d.mts
similarity index 95%
rename from src/foundry/prosemirror/menu.d.mts
rename to src/foundry/common/prosemirror/menu.d.mts
index 7d8610e5a..15d0fb251 100644
--- a/src/foundry/prosemirror/menu.d.mts
+++ b/src/foundry/common/prosemirror/menu.d.mts
@@ -5,7 +5,7 @@ import type { ProseMirrorCommand } from "./keymaps.d.mts";
 import type ProseMirrorPlugin from "./plugin.d.mts";
 
 export declare namespace ProseMirrorMenu {
-  export interface Options {
+  export interface ProseMirrorMenuOptions {
     /** A function to call when the save button is pressed. */
     onSave?: () => void;
     /** Whether this editor instance is intended to be destroyed when saved. */
@@ -73,7 +73,10 @@ declare class ProseMirrorMenu extends ProseMirrorPlugin {
    * @param view    - The editor view.
    * @param options - Additional options to configure the plugin's behaviour.
    */
-  constructor(schema: Schema, view: EditorView, options?: ProseMirrorMenu.Options);
+  constructor(schema: Schema, view: EditorView, options?: ProseMirrorMenu.ProseMirrorMenuOptions);
+
+  // placeholder private attribute to support subclassing.
+  #proseMirrorMenu: true;
 
   /**
    * The editor view.
@@ -102,14 +105,14 @@ declare class ProseMirrorMenu extends ProseMirrorPlugin {
   /**
    * Additional options to configure the plugin's behaviour.
    */
-  options: ProseMirrorMenu.Options;
+  options: ProseMirrorMenu.ProseMirrorMenuOptions;
 
   /**
    * The dropdowns configured for this menu.
    */
   dropdowns: ProseMirrorDropDown.Entry[];
 
-  static override build(schema: Schema, options?: ProseMirrorMenu.Options): Plugin;
+  static override build(schema: Schema, options?: ProseMirrorMenu.ProseMirrorMenuOptions): Plugin;
 
   /**
    * Render the menu's HTML.
@@ -186,6 +189,11 @@ declare class ProseMirrorMenu extends ProseMirrorPlugin {
    */
   protected _handleSave(): void;
 
+  /**
+   * Global listeners for the drop-down menu.
+   */
+  static eventListeners(): void;
+
   /**
    * Display the insert image prompt.
    */
diff --git a/src/foundry/prosemirror/paste-transformer.d.mts b/src/foundry/common/prosemirror/paste-transformer.d.mts
similarity index 83%
rename from src/foundry/prosemirror/paste-transformer.d.mts
rename to src/foundry/common/prosemirror/paste-transformer.d.mts
index 5672c6d40..3d4de1d26 100644
--- a/src/foundry/prosemirror/paste-transformer.d.mts
+++ b/src/foundry/common/prosemirror/paste-transformer.d.mts
@@ -2,6 +2,7 @@ import type { Schema, Slice } from "prosemirror-model";
 import type ProseMirrorPlugin from "./plugin.d.mts";
 import type { Plugin } from "prosemirror-state";
 import type { EditorView } from "prosemirror-view";
+import type { EmptyObject } from "../../../types/utils.d.mts";
 
 export default ProseMirrorPasteTransformer;
 
@@ -9,7 +10,7 @@ export default ProseMirrorPasteTransformer;
  * A class responsible for applying transformations to content pasted inside the editor.
  */
 declare class ProseMirrorPasteTransformer extends ProseMirrorPlugin {
-  static override build(schema: Schema, options?: Record<string, unknown>): Plugin;
+  static override build(schema: Schema, options?: EmptyObject): Plugin;
 
   /**
    * Transform content before it is injected into the ProseMirror document.
diff --git a/src/foundry/prosemirror/plugin.d.mts b/src/foundry/common/prosemirror/plugin.d.mts
similarity index 83%
rename from src/foundry/prosemirror/plugin.d.mts
rename to src/foundry/common/prosemirror/plugin.d.mts
index e98211249..4e67135c6 100644
--- a/src/foundry/prosemirror/plugin.d.mts
+++ b/src/foundry/common/prosemirror/plugin.d.mts
@@ -1,5 +1,6 @@
 import type { Schema } from "prosemirror-model";
 import type { Plugin } from "prosemirror-state";
+import type { AnyObject } from "../../../types/utils.d.mts";
 
 export default ProseMirrorPlugin;
 declare abstract class ProseMirrorPlugin {
@@ -19,5 +20,5 @@ declare abstract class ProseMirrorPlugin {
    * @param options - Additional options to pass to the plugin.
    * @virtual
    */
-  static build(schema: Schema, options?: Record<string, unknown>): Plugin;
+  static build(schema: Schema, options?: AnyObject): Plugin;
 }
diff --git a/src/foundry/prosemirror/schema.d.mts b/src/foundry/common/prosemirror/schema.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema.d.mts
rename to src/foundry/common/prosemirror/schema.d.mts
diff --git a/src/foundry/common/prosemirror/schema/attribute-capture.d.mts b/src/foundry/common/prosemirror/schema/attribute-capture.d.mts
new file mode 100644
index 000000000..5c2141131
--- /dev/null
+++ b/src/foundry/common/prosemirror/schema/attribute-capture.d.mts
@@ -0,0 +1,39 @@
+import type { DOMOutputSpec, MarkSpec, NodeSpec } from "prosemirror-model";
+
+/**
+ * A class responsible for injecting attribute capture logic into the ProseMirror schema.
+ */
+declare class AttributeCapture {
+  constructor();
+
+  // placeholder for subclassing
+  #attributeCapture: true;
+
+  /**
+   * Augments the schema definition to allow each node or mark to capture all the attributes
+   * on an element and preserve them when re-serialized back into the DOM.
+   * @param spec - The schema specification
+   */
+  attributeCapture(spec: NodeSpec | MarkSpec): DOMOutputSpec;
+}
+
+declare namespace AttributeCapture {
+  // only used in truly private methods
+  // interface AllowedAttributeConfiguration {
+  //   /**  The set of exactly-matching attribute names. **/
+  //   attrs: Set<string>;
+  //   /** A list of wildcard allowed prefixes for attributes. **/
+  //   wildcards: string[];
+  // }
+  // only used in truly private methods
+  // interface ManagedAttributesSpec {
+  //   /**  A list of managed attributes. */
+  //   attributes: string[];
+  //   /**  A list of CSS property names that are managed as inline styles. */
+  //   styles: string[];
+  //   /**  A list of managed class names. */
+  //   classes: string[];
+  // }
+}
+
+export default AttributeCapture;
diff --git a/src/foundry/prosemirror/schema/core.d.mts b/src/foundry/common/prosemirror/schema/core.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/core.d.mts
rename to src/foundry/common/prosemirror/schema/core.d.mts
diff --git a/src/foundry/prosemirror/schema/image-link-node.d.mts b/src/foundry/common/prosemirror/schema/image-link-node.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/image-link-node.d.mts
rename to src/foundry/common/prosemirror/schema/image-link-node.d.mts
diff --git a/src/foundry/prosemirror/schema/image-node.d.mts b/src/foundry/common/prosemirror/schema/image-node.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/image-node.d.mts
rename to src/foundry/common/prosemirror/schema/image-node.d.mts
diff --git a/src/foundry/prosemirror/schema/index.d.mts b/src/foundry/common/prosemirror/schema/index.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/index.d.mts
rename to src/foundry/common/prosemirror/schema/index.d.mts
diff --git a/src/foundry/prosemirror/schema/link-mark.d.mts b/src/foundry/common/prosemirror/schema/link-mark.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/link-mark.d.mts
rename to src/foundry/common/prosemirror/schema/link-mark.d.mts
diff --git a/src/foundry/prosemirror/schema/lists.d.mts b/src/foundry/common/prosemirror/schema/lists.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/lists.d.mts
rename to src/foundry/common/prosemirror/schema/lists.d.mts
diff --git a/src/foundry/prosemirror/schema/marks.d.mts b/src/foundry/common/prosemirror/schema/marks.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/marks.d.mts
rename to src/foundry/common/prosemirror/schema/marks.d.mts
diff --git a/src/foundry/prosemirror/schema/other.d.mts b/src/foundry/common/prosemirror/schema/other.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/other.d.mts
rename to src/foundry/common/prosemirror/schema/other.d.mts
diff --git a/src/foundry/prosemirror/schema/schema-definition.d.mts b/src/foundry/common/prosemirror/schema/schema-definition.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/schema-definition.d.mts
rename to src/foundry/common/prosemirror/schema/schema-definition.d.mts
diff --git a/src/foundry/prosemirror/schema/secret-node.d.mts b/src/foundry/common/prosemirror/schema/secret-node.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/secret-node.d.mts
rename to src/foundry/common/prosemirror/schema/secret-node.d.mts
diff --git a/src/foundry/prosemirror/schema/tables.d.mts b/src/foundry/common/prosemirror/schema/tables.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/tables.d.mts
rename to src/foundry/common/prosemirror/schema/tables.d.mts
diff --git a/src/foundry/prosemirror/schema/utils.d.mts b/src/foundry/common/prosemirror/schema/utils.d.mts
similarity index 100%
rename from src/foundry/prosemirror/schema/utils.d.mts
rename to src/foundry/common/prosemirror/schema/utils.d.mts
diff --git a/src/foundry/prosemirror/string-serializer.d.mts b/src/foundry/common/prosemirror/string-serializer.d.mts
similarity index 100%
rename from src/foundry/prosemirror/string-serializer.d.mts
rename to src/foundry/common/prosemirror/string-serializer.d.mts
diff --git a/src/foundry/prosemirror/util.d.mts b/src/foundry/common/prosemirror/util.d.mts
similarity index 100%
rename from src/foundry/prosemirror/util.d.mts
rename to src/foundry/common/prosemirror/util.d.mts
diff --git a/src/foundry/common/types.d.mts b/src/foundry/common/types.d.mts
index f77bb2786..4aa8453c4 100644
--- a/src/foundry/common/types.d.mts
+++ b/src/foundry/common/types.d.mts
@@ -8,7 +8,7 @@ declare global {
      * The parent Document of this one, if this one is embedded
      * @defaultValue `null`
      */
-    parent?: foundry.abstract.Document<any, any, any> | null | undefined;
+    parent?: foundry.abstract.Document.Any | null | undefined;
 
     /**
      * The compendium collection ID which contains this Document, if any
@@ -28,7 +28,7 @@ declare global {
     /**
      * A parent Document within which these Documents should be embedded
      */
-    parent?: foundry.abstract.Document<any, any, any> | undefined;
+    parent?: foundry.abstract.Document.Any | undefined;
 
     /**
      * A Compendium pack identifier within which the Documents should be modified
@@ -144,10 +144,10 @@ declare global {
     /** The namespace the setting belongs to */
     namespace: string;
 
-    /** The human readable name */
+    /** The human-readable name */
     name?: string | undefined;
 
-    /** An additional human readable hint */
+    /** An additional human-readable hint */
     hint?: string | undefined;
 
     /**
@@ -363,40 +363,9 @@ declare global {
   type RequestData = Record<string, unknown> | Record<string, unknown>[] | string | string[];
 
   interface SocketRequest {
-    /**
-     * The server-side action being requested
-     */
-    action?: string | undefined;
-
-    /**
-     * The type of object being modified
-     */
-    type?: string | undefined;
-
-    /**
-     * Data applied to the operation
-     */
-    data?: RequestData | undefined;
-
-    /**
-     * A Compendium pack name
-     */
-    pack?: string | undefined;
-
-    /**
-     * The type of parent document
-     */
-    parentType?: string | undefined;
-
-    /**
-     * The ID of a parent document
-     */
-    parentId?: string | undefined;
-
-    /**
-     * Additional options applied to the request
-     */
+    /** Additional options applied to the request */
     options?: Record<string, unknown> | undefined;
+    broadcast?: boolean | undefined;
   }
 
   interface SocketResponse {
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/foundry/common/utils/string-tree.d.mts b/src/foundry/common/utils/string-tree.d.mts
index f99fc9b5b..f113ec0ee 100644
--- a/src/foundry/common/utils/string-tree.d.mts
+++ b/src/foundry/common/utils/string-tree.d.mts
@@ -33,6 +33,8 @@ declare class StringTree<EntryType> {
     options?: InexactPartial<{
       /** The maximum number of items to retrieve. */
       limit: number;
+      /** A filter function to apply to each candidate entry. */
+      filterEntries?: StringTree.StringTreeEntryFilter | undefined;
     }>,
   ): StringTree.StringTreeNode[];
 
@@ -82,6 +84,12 @@ declare namespace StringTree {
     [StringTree.leaves]: Record<string, unknown>[];
     [key: string]: StringTreeNode;
   }
+
+  /**
+   * @param entry   - The entry to filter.
+   * @returns Whether the entry should be included in the result set.
+   */
+  type StringTreeEntryFilter = (entry: unknown) => boolean;
 }
 
 export default StringTree;
diff --git a/src/foundry/common/utils/word-tree.d.mts b/src/foundry/common/utils/word-tree.d.mts
index 6537b63aa..7fc92ad2d 100644
--- a/src/foundry/common/utils/word-tree.d.mts
+++ b/src/foundry/common/utils/word-tree.d.mts
@@ -26,11 +26,14 @@ declare class WordTree extends StringTree<WordTree.WordTreeEntry> {
     prefix: string,
     options?: InexactPartial<{
       /**
-       * The maximum number of items to retrieve. Defaults to 10. It is important
+       * The maximum number of items to retrieve. It is important
        * to set this value as very short prefixes will naturally match large numbers
        * of entries.
+       * (default: `10`)
        */
       limit: number;
+      /** A filter function to apply to each candidate entry. */
+      filterEntries?: StringTree.StringTreeEntryFilter | undefined;
     }>,
   ): WordTree.WordTreeEntry[];
   lookup(strings: string[], options?: InexactPartial<{ limit: number }>): StringTree.StringTreeNode[];
diff --git a/src/foundry/index.d.mts b/src/foundry/index.d.mts
index bc27ae6d6..be910d321 100644
--- a/src/foundry/index.d.mts
+++ b/src/foundry/index.d.mts
@@ -1,5 +1,5 @@
 import "./client/index.d.mts";
 import "./client-esm/client.d.mts";
 import "./clipper/index.d.mts";
-import "./prosemirror/index.d.mts";
+import "./common/prosemirror/index.d.mts";
 import "./public/index.d.mts";
diff --git a/src/foundry/prosemirror/highlight-matches-plugin.d.mts b/src/foundry/prosemirror/highlight-matches-plugin.d.mts
deleted file mode 100644
index a1581a47b..000000000
--- a/src/foundry/prosemirror/highlight-matches-plugin.d.mts
+++ /dev/null
@@ -1,78 +0,0 @@
-import { Schema } from "prosemirror-model";
-import type ProseMirrorPlugin from "./plugin.d.mts";
-import type { ProseMirrorMenu } from "./menu.d.mts";
-import { EditorState, Plugin } from "prosemirror-state";
-import { EditorView } from "prosemirror-view";
-
-/**
- * A class responsible for handling the display of automated link recommendations when a user highlights text in a
- * ProseMirror editor.
- */
-declare class PossibleMatchesTooltip {
-  /**
-   * @param view - The editor view
-   */
-  constructor(view: EditorView);
-
-  /**
-   * A reference to any existing tooltip that has been generated as part of a highlight match.
-   */
-  tooltip: HTMLElement;
-
-  update(view: EditorView, lastState: EditorState): Promise<void>;
-
-  /**
-   * Create a locked tooltip at the given position
-   * @param position - A position object with coordinates for where the tooltip should be placed
-   * @param text     - Explicit tooltip text or HTML to display.
-   * @param options  - Additional options which can override tooltip behavior.
-   */
-  _createTooltip(
-    position: {
-      /** Explicit top position for the tooltip */
-      top?: string;
-      /** Explicit right position for the tooltip */
-      right?: string;
-      /** Explicit bottom position for the tooltip */
-      bottom?: string;
-      /** Explicit left position for the tooltip */
-      left?: string;
-    },
-    text: string,
-    options?: {
-      /** An optional, space-separated list of CSS classes to apply to the activated tooltip. */
-      cssClass: string;
-    },
-  ): void;
-
-  /**
-   * Update the tooltip with new HTML
-   * @param html - The HTML to be included in the tooltip
-   */
-  _updateTooltip(html: string): void;
-
-  /**
-   * Dismiss all locked tooltips and set this tooltip to undefined.
-   */
-  _deactivateTooltip(): void;
-
-  /**
-   * Find all Documents in the world/compendia with names that match the selection insensitive to case.
-   * @param text - A string which will be matched against document names
-   */
-  _findMatches(text: string): string;
-}
-
-export default ProseMirrorHighlightMatchesPlugin;
-/**
- * A ProseMirrorPlugin wrapper around the {@link PossibleMatchesTooltip} class.
- */
-declare class ProseMirrorHighlightMatchesPlugin extends ProseMirrorPlugin {
-  /**
-   * @param schema  - The ProseMirror schema.
-   * @param options - Additional options to configure the plugin's behaviour.
-   */
-  constructor(schema: Schema, options: ProseMirrorMenu.Options);
-
-  static override build(schema: Schema, options?: Record<string, unknown> | undefined): Plugin;
-}
diff --git a/src/foundry/prosemirror/schema/attribute-capture.d.mts b/src/foundry/prosemirror/schema/attribute-capture.d.mts
deleted file mode 100644
index 1bb35dca3..000000000
--- a/src/foundry/prosemirror/schema/attribute-capture.d.mts
+++ /dev/null
@@ -1,16 +0,0 @@
-import type { DOMOutputSpec, MarkSpec, NodeSpec } from "prosemirror-model";
-
-export default AttributeCapture;
-/**
- * A class responsible for injecting attribute capture logic into the ProseMirror schema.
- */
-declare class AttributeCapture {
-  constructor();
-
-  /**
-   * Augments the schema definition to allow each node or mark to capture all the attributes
-   * on an element and preserve them when re-serialized back into the DOM.
-   * @param spec - The schema specification
-   */
-  attributeCapture(spec: NodeSpec | MarkSpec): DOMOutputSpec;
-}
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/document-index.test-d.ts b/tests/foundry/client/core/document-index.test-d.ts
new file mode 100644
index 000000000..fb61f4ef9
--- /dev/null
+++ b/tests/foundry/client/core/document-index.test-d.ts
@@ -0,0 +1,16 @@
+import { expectTypeOf } from "vitest";
+
+const docindex = new DocumentIndex();
+
+expectTypeOf(docindex.trees).toEqualTypeOf<Record<string, foundry.utils.WordTree>>();
+expectTypeOf(docindex.uuids).toEqualTypeOf<Record<string, foundry.utils.StringTree.StringTreeNode>>();
+expectTypeOf(docindex.ready).toEqualTypeOf<Promise<void> | null>();
+expectTypeOf(docindex.index()).toEqualTypeOf<Promise<void>>();
+
+expectTypeOf(docindex.lookup("")).toEqualTypeOf<Record<string, foundry.utils.WordTree.WordTreeEntry[]>>();
+
+declare const doc: JournalEntry;
+
+expectTypeOf(docindex.addDocument(doc)).toEqualTypeOf<void>();
+expectTypeOf(docindex.removeDocument(doc)).toEqualTypeOf<void>();
+expectTypeOf(docindex.replaceDocument(doc)).toEqualTypeOf<void>();
diff --git a/tests/foundry/client/core/issues.test-d.ts b/tests/foundry/client/core/issues.test-d.ts
new file mode 100644
index 000000000..0df1b8914
--- /dev/null
+++ b/tests/foundry/client/core/issues.test-d.ts
@@ -0,0 +1,13 @@
+import { expectTypeOf } from "vitest";
+import type { DocumentType } from "../../../../src/types/helperTypes.d.mts";
+import type { DataModelValidationError } from ",,/../../src/foundry/common/data/validation-failure.d.mts";
+
+const issues = new ClientIssues();
+
+expectTypeOf(issues.getSubTypeCountsFor("")).toEqualTypeOf<ModuleSubTypeCounts | undefined>();
+expectTypeOf(issues.getAllSubtypeCounts()).toEqualTypeOf<IterableIterator<[string, ModuleSubTypeCounts]>>();
+expectTypeOf(issues.usabilityIssues).toEqualTypeOf<Record<string, ClientIssues.UsabilityIssue>>();
+expectTypeOf(issues.packageCompatibilityIssues).toEqualTypeOf<{ error: string[]; warning: string[] }>();
+expectTypeOf(issues.validationFailures).toEqualTypeOf<
+  Record<DocumentType, Record<string, { name: string; error: DataModelValidationError }>>
+>();
diff --git a/tests/foundry/client/core/keybindings.test-d.ts b/tests/foundry/client/core/keybindings.test-d.ts
new file mode 100644
index 000000000..aaca5e90a
--- /dev/null
+++ b/tests/foundry/client/core/keybindings.test-d.ts
@@ -0,0 +1,19 @@
+import { expectTypeOf } from "vitest";
+
+const keybindings = new ClientKeybindings();
+
+expectTypeOf(keybindings.actions).toEqualTypeOf<Map<string, KeybindingActionConfig>>();
+expectTypeOf(keybindings.activeKeys).toEqualTypeOf<Map<string, KeybindingAction[]>>();
+expectTypeOf(keybindings.bindings).toEqualTypeOf<Map<string, KeybindingActionBinding[]> | undefined>();
+expectTypeOf(keybindings.moveKeys).toEqualTypeOf<Set<string>>();
+expectTypeOf(keybindings.initialize()).toEqualTypeOf<void>();
+
+declare const kbac: KeybindingActionConfig;
+
+expectTypeOf(keybindings.register("", "", kbac)).toEqualTypeOf<void>();
+expectTypeOf(keybindings.get("", "")).toEqualTypeOf<KeybindingActionBinding[]>();
+expectTypeOf(keybindings.set("", "")).toEqualTypeOf<Promise<void>>();
+expectTypeOf(keybindings.resetDefaults()).toEqualTypeOf<Promise<void>>();
+
+expectTypeOf(ClientKeybindings.MOVEMENT_DIRECTIONS).toEqualTypeOf<ClientKeybindings.MovementDirections>();
+expectTypeOf(ClientKeybindings.ZOOM_DIRECTIONS).toEqualTypeOf<ClientKeybindings.ZoomDirections>();
diff --git a/tests/foundry/client/core/keyboard.test-d.ts b/tests/foundry/client/core/keyboard.test-d.ts
new file mode 100644
index 000000000..5d5e4edf4
--- /dev/null
+++ b/tests/foundry/client/core/keyboard.test-d.ts
@@ -0,0 +1,55 @@
+import { expectTypeOf } from "vitest";
+
+const keyboard = new KeyboardManager();
+
+expectTypeOf(keyboard.downKeys).toEqualTypeOf<Set<string>>();
+expectTypeOf(keyboard.moveKeys).toEqualTypeOf<Set<string>>();
+expectTypeOf(keyboard.hasFocus).toEqualTypeOf<boolean>();
+expectTypeOf(keyboard.isModifierActive("")).toEqualTypeOf<boolean>();
+expectTypeOf(keyboard.isCoreActionKeyActive("")).toEqualTypeOf<boolean>();
+expectTypeOf(keyboard.releaseKeys()).toEqualTypeOf<void>();
+
+expectTypeOf(KeyboardManager.MODIFIER_KEYS).toEqualTypeOf<{
+  CONTROL: "Control";
+  SHIFT: "Shift";
+  ALT: "Alt";
+}>();
+expectTypeOf(KeyboardManager.MODIFIER_CODES).toEqualTypeOf<{
+  Alt: ["AltLeft", "AltRight"];
+  Control: ["ControlLeft", "ControlRight", "MetaLeft", "MetaRight", "Meta", "OsLeft", "OsRight"];
+  Shift: ["ShiftLeft", "ShiftRight"];
+}>();
+expectTypeOf(KeyboardManager.PROTECTED_KEYS).toEqualTypeOf<
+  ["F5", "F11", "F12", "PrintScreen", "ScrollLock", "NumLock", "CapsLock"]
+>();
+expectTypeOf(KeyboardManager.CONTROL_KEY_STRING).toEqualTypeOf<"⌘" | "Control">();
+expectTypeOf(KeyboardManager.KEYCODE_DISPLAY_MAPPING).toEqualTypeOf<{
+  ArrowLeft: "←" | "🡸";
+  ArrowRight: "→" | "🡺";
+  ArrowUp: "↑" | "🡹";
+  ArrowDown: "↓" | "🡻";
+  Backquote: "`";
+  Backslash: "\\";
+  BracketLeft: "[";
+  BracketRight: "]";
+  Comma: ",";
+  Control: (typeof KeyboardManager)["CONTROL_KEY_STRING"];
+  Equal: "=";
+  Meta: "⌘" | "⊞";
+  MetaLeft: "⌘" | "⊞";
+  MetaRight: "⌘" | "⊞";
+  OsLeft: "⌘" | "⊞";
+  OsRight: "⌘" | "⊞";
+  Minus: "-";
+  NumpadAdd: "Numpad+";
+  NumpadSubtract: "Numpad-";
+  Period: ".";
+  Quote: "'";
+  Semicolon: ";";
+  Slash: "/";
+}>();
+expectTypeOf(KeyboardManager.emulateKeypress(true, "")).toEqualTypeOf<KeyboardEventContext>();
+expectTypeOf(KeyboardManager.getKeycodeDisplayString("")).toEqualTypeOf<string>();
+
+declare const event: KeyboardEvent;
+expectTypeOf(KeyboardManager.getKeyboardEventContext(event, true)).toEqualTypeOf<KeyboardEventContext>();
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/socket.test-d.ts b/tests/foundry/client/core/socket.test-d.ts
new file mode 100644
index 000000000..56afb82a7
--- /dev/null
+++ b/tests/foundry/client/core/socket.test-d.ts
@@ -0,0 +1,8 @@
+import { expectTypeOf } from "vitest";
+import type { DocumentSocketRequest } from "../../../../src/foundry/common/abstract/_types.d.mts";
+
+declare const request: DocumentSocketRequest<"get">;
+declare const request2: ManageCompendiumRequest;
+
+expectTypeOf(SocketInterface.dispatch("", request)).toEqualTypeOf<Promise<SocketResponse>>();
+expectTypeOf(SocketInterface.dispatch("", request2)).toEqualTypeOf<Promise<SocketResponse>>();
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/core/workers.test-d.ts b/tests/foundry/client/core/workers.test-d.ts
new file mode 100644
index 000000000..bac0052d8
--- /dev/null
+++ b/tests/foundry/client/core/workers.test-d.ts
@@ -0,0 +1,23 @@
+import { expectTypeOf } from "vitest";
+
+const asyncWorker = new AsyncWorker("");
+
+expectTypeOf(asyncWorker.name).toEqualTypeOf<string>();
+expectTypeOf(asyncWorker.ready).toEqualTypeOf<Promise<void>>();
+expectTypeOf(asyncWorker.loadFunction("", () => null)).toEqualTypeOf<Promise<unknown>>();
+expectTypeOf(asyncWorker.executeFunction("")).toEqualTypeOf<Promise<unknown>>();
+
+expectTypeOf(AsyncWorker.WORKER_HARNESS_JS).toEqualTypeOf<string>();
+
+const manager = new WorkerManager();
+
+expectTypeOf(manager.createWorker("")).toEqualTypeOf<Promise<AsyncWorker>>();
+expectTypeOf(manager.retireWorker("")).toEqualTypeOf<void>();
+
+expectTypeOf(WorkerManager.WORKER_TASK_ACTIONS).toEqualTypeOf<
+  Readonly<{
+    INIT: "init";
+    LOAD: "load";
+    EXECUTE: "execute";
+  }>
+>();
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/client/ui/context.test-d.ts b/tests/foundry/client/ui/context.test-d.ts
index 0d5e91d6b..f77b74447 100644
--- a/tests/foundry/client/ui/context.test-d.ts
+++ b/tests/foundry/client/ui/context.test-d.ts
@@ -16,7 +16,17 @@ const contextMenu = new ContextMenu(element, ".some-class", [
     },
   },
 ]);
+expectTypeOf(contextMenu.element).toEqualTypeOf<JQuery>();
+expectTypeOf(contextMenu.selector).toEqualTypeOf<string>();
+expectTypeOf(contextMenu.eventName).toEqualTypeOf<string>();
+expectTypeOf(contextMenu.menuItems).toEqualTypeOf<ContextMenuEntry[]>();
+expectTypeOf(contextMenu.onOpen).toEqualTypeOf<ContextMenu.ContextMenuCallback>();
+expectTypeOf(contextMenu.onClose).toEqualTypeOf<ContextMenu.ContextMenuCallback>();
+expectTypeOf(contextMenu.menu).toEqualTypeOf<JQuery>();
 
+declare const app: foundry.applications.api.ApplicationV2;
+expectTypeOf(ContextMenu.create(app, new HTMLElement(), ".class", [])).toEqualTypeOf<ContextMenu>();
 expectTypeOf(contextMenu.bind()).toEqualTypeOf<void>();
-expectTypeOf(contextMenu.render(element)).toEqualTypeOf<void | Promise<void>>();
+expectTypeOf(contextMenu.close()).toEqualTypeOf<Promise<void>>();
+expectTypeOf(contextMenu.render(element)).toEqualTypeOf<void | Promise<JQuery | void>>();
 expectTypeOf(contextMenu.menuItems).toEqualTypeOf<ContextMenuEntry[]>();
diff --git a/tests/foundry/client/ui/filepicker.test-d.ts b/tests/foundry/client/ui/filepicker.test-d.ts
new file mode 100644
index 000000000..9e5deaf34
--- /dev/null
+++ b/tests/foundry/client/ui/filepicker.test-d.ts
@@ -0,0 +1,54 @@
+import { expectTypeOf } from "vitest";
+import type { MaybePromise } from "../../../../src/types/utils.d.mts";
+
+const filepicker = new FilePicker();
+expectTypeOf(filepicker).toEqualTypeOf<FilePicker>();
+
+expectTypeOf(filepicker.request).toEqualTypeOf<string | undefined>();
+expectTypeOf(filepicker.sources).toEqualTypeOf<FilePicker.Sources>();
+expectTypeOf(filepicker.activeSource).toEqualTypeOf<FilePicker.SourceType>();
+
+expectTypeOf(filepicker.callback).toEqualTypeOf<FilePicker.Callback | undefined>();
+expectTypeOf(filepicker.results).toEqualTypeOf<{}>();
+expectTypeOf(filepicker.type).toEqualTypeOf<FilePicker.Type>();
+expectTypeOf(filepicker.field).toEqualTypeOf<HTMLElement | undefined>();
+expectTypeOf(filepicker.button).toEqualTypeOf<HTMLElement | undefined>();
+expectTypeOf(filepicker.displayMode).toEqualTypeOf<FilePicker.DisplayMode>();
+expectTypeOf(filepicker.extensions).toEqualTypeOf<string[] | undefined>();
+
+expectTypeOf(FilePicker.FILE_TYPES).toEqualTypeOf<string[]>();
+expectTypeOf(FilePicker.LAST_BROWSED_DIRECTORY).toEqualTypeOf<string>();
+expectTypeOf(FilePicker.LAST_TILE_SIZE).toEqualTypeOf<number | null>();
+expectTypeOf(FilePicker.LAST_DISPLAY_MODE).toEqualTypeOf<FilePicker.DisplayMode>();
+
+expectTypeOf(FilePicker.DISPLAY_MODES).toEqualTypeOf<["list", "thumbs", "tiles", "images"]>();
+expectTypeOf(FilePicker.S3_BUCKETS).toEqualTypeOf<string[] | null>();
+expectTypeOf(FilePicker.favorites).toEqualTypeOf<Record<string, FilePicker.FavoriteFolder>>();
+expectTypeOf(FilePicker.setFavorite("", "")).toEqualTypeOf<Promise<void>>();
+expectTypeOf(FilePicker.setFavorite("", "")).toEqualTypeOf<Promise<void>>();
+expectTypeOf(FilePicker.defaultOptions).toEqualTypeOf<FilePickerOptions>();
+expectTypeOf(FilePicker.matchS3URL("")).toEqualTypeOf<RegExpMatchArray | null>();
+
+expectTypeOf(filepicker.title).toEqualTypeOf<string>();
+expectTypeOf(filepicker.source).toEqualTypeOf<FilePicker.Source>();
+expectTypeOf(filepicker.target).toEqualTypeOf<string>();
+expectTypeOf(filepicker.canUpload).toEqualTypeOf<boolean>();
+expectTypeOf(filepicker.getData()).toEqualTypeOf<MaybePromise<object>>();
+expectTypeOf(filepicker.setPosition()).toEqualTypeOf<void | (Application.Position & { height: number })>();
+expectTypeOf(filepicker.browse("")).toEqualTypeOf<Promise<FilePicker.BrowseResult>>();
+
+expectTypeOf(FilePicker.browse("data", "")).toEqualTypeOf<Promise<FilePicker.BrowseResult>>();
+expectTypeOf(FilePicker.configurePath("data", "")).toEqualTypeOf<Promise<FilePicker.ConfigurePathResult>>();
+expectTypeOf(FilePicker.createDirectory("data", "")).toEqualTypeOf<Promise<string>>();
+
+const file = new File([], "testfile");
+expectTypeOf(FilePicker.upload("data", "", file)).toEqualTypeOf<Promise<FilePicker.UploadResult | false | void | {}>>();
+
+expectTypeOf(FilePicker.uploadPersistent("", "", file)).toEqualTypeOf<
+  Promise<FilePicker.UploadResult | false | void | {}>
+>();
+
+expectTypeOf(filepicker.render()).toEqualTypeOf<FilePicker>();
+expectTypeOf(filepicker.activateListeners(jQuery("document"))).toEqualTypeOf<void>();
+
+expectTypeOf(FilePicker.fromButton(new HTMLButtonElement())).toEqualTypeOf<FilePicker>();
diff --git a/tests/foundry/client/ui/forms.test-d.ts b/tests/foundry/client/ui/forms.test-d.ts
new file mode 100644
index 000000000..24592a485
--- /dev/null
+++ b/tests/foundry/client/ui/forms.test-d.ts
@@ -0,0 +1,11 @@
+import { expectTypeOf } from "vitest";
+
+declare const htmlForm: HTMLFormElement;
+
+const formData = new FormDataExtended(htmlForm);
+expectTypeOf(formData.dtypes).toEqualTypeOf<Partial<Record<string, string>>>();
+expectTypeOf(formData.editors).toEqualTypeOf<Partial<Record<string, FormApplication.FormApplicationEditor>>>();
+expectTypeOf(formData.object).toEqualTypeOf<Record<string, string | number>>();
+expectTypeOf(formData.process(htmlForm, {})).toEqualTypeOf<void>();
+expectTypeOf(formData.set("field", "value")).toEqualTypeOf<void>();
+expectTypeOf(formData.append("field", "value")).toEqualTypeOf<void>();
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/prosemirror/prosemirror.test-d.ts b/tests/foundry/common/prosemirror/prosemirror.test-d.ts
similarity index 84%
rename from tests/foundry/prosemirror/prosemirror.test-d.ts
rename to tests/foundry/common/prosemirror/prosemirror.test-d.ts
index df5d90b54..65ba23e4f 100644
--- a/tests/foundry/prosemirror/prosemirror.test-d.ts
+++ b/tests/foundry/common/prosemirror/prosemirror.test-d.ts
@@ -1,7 +1,7 @@
 import type { Schema } from "prosemirror-model";
 import type { EditorState } from "prosemirror-state";
 import { expectTypeOf } from "vitest";
-import "../../../src/foundry/prosemirror/index.d.mts";
+import "../../../../src/foundry/common/prosemirror/index.d.mts";
 
 expectTypeOf(ProseMirror.EditorState).toEqualTypeOf<typeof EditorState>();
 expectTypeOf(ProseMirror.Schema).toEqualTypeOf<typeof Schema>();
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;
 }>();
 
diff --git a/tests/foundry/common/utils/word-tree.mjs.test-d.ts b/tests/foundry/common/utils/word-tree.mjs.test-d.ts
index 580d546a6..c910b07db 100644
--- a/tests/foundry/common/utils/word-tree.mjs.test-d.ts
+++ b/tests/foundry/common/utils/word-tree.mjs.test-d.ts
@@ -3,6 +3,7 @@ import { expectTypeOf } from "vitest";
 const w = new foundry.utils.WordTree();
 declare const entry: foundry.utils.WordTree.WordTreeEntry;
 
-expectTypeOf(w.addLeaf("a", entry)).toEqualTypeOf<foundry.utils.WordTree.WordTreeEntry>();
+expectTypeOf(w.addLeaf("a", entry)).toEqualTypeOf<foundry.utils.StringTree.StringTreeNode>();
+expectTypeOf(w.addLeaf(["a"], entry)).toEqualTypeOf<foundry.utils.StringTree.StringTreeNode>();
 expectTypeOf(w.lookup("a", { limit: 4 })).toEqualTypeOf<foundry.utils.WordTree.WordTreeEntry[]>();
 expectTypeOf(w.nodeAtPrefix("a")).toEqualTypeOf<foundry.utils.WordTree.WordTreeEntry>();