Repository: League-of-Foundry-Developers/foundry-vtt-types
Pull request #3058 (2025-02-02 23:01:58)

Prosemirror tests
Please pay particular attention to the imports that I changed in /common/prosemirror/_module.d.mts

Those should be classes that are available as properties of both `fo;undry.prosemirror` and `ProseMirror`.  I think I did it correctly (and the tests pass), but just wanted to make sure it wasn't going to break something else.


Patch:
diff --git a/src/configuration/globals.d.mts b/src/configuration/globals.d.mts
index 382b6f14f..ab586180d 100644
--- a/src/configuration/globals.d.mts
+++ b/src/configuration/globals.d.mts
@@ -27,7 +27,7 @@ export import Actors = globalThis.Actors;
 export import AdaptiveBackgroundShader = globalThis.AdaptiveBackgroundShader;
 export import AdaptiveColorationShader = globalThis.AdaptiveColorationShader;
 export import AdaptiveDarknessShader = globalThis.AdaptiveDarknessShader;
-export import AdaptiveFragmentChannelMixin = globalThis.AdaptiveFragmentChannelMixin;
+export import AdaptiveFragmentChannel = globalThis.AdaptiveFragmentChannel;
 export import AdaptiveIlluminationShader = globalThis.AdaptiveIlluminationShader;
 export import AdaptiveLightingShader = globalThis.AdaptiveLightingShader;
 export import AdaptiveVisionShader = globalThis.AdaptiveVisionShader;
@@ -54,7 +54,7 @@ export import AudioNode = globalThis.AudioNode;
 export import BackgroundVisionShader = globalThis.BackgroundVisionShader;
 export import BasePlaceableHUD = globalThis.BasePlaceableHUD;
 export import BaseSamplerShader = globalThis.BaseSamplerShader;
-export import BaseShaderMixin = globalThis.BaseShaderMixin;
+export import BaseShader = globalThis.BaseShader;
 export import BaseSheet = globalThis.BaseSheet;
 export import BaselineIlluminationSamplerShader = globalThis.BaselineIlluminationSamplerShader;
 export import BatchRenderer = globalThis.BatchRenderer;
@@ -93,10 +93,8 @@ export import ClientDocument = globalThis.ClientDocument;
 export import ClientIssues = globalThis.ClientIssues;
 export import ClientKeybindings = globalThis.ClientKeybindings;
 export import ClientPackage = globalThis.ClientPackage;
-export import ClientPackageMixin = globalThis.ClientPackageMixin;
 export import ClientSettings = globalThis.ClientSettings;
 export import ClipperLib = globalThis.ClipperLib;
-export import ClockwiseSweepPolygon = globalThis.ClockwiseSweepPolygon;
 export import ColorAdjustmentsSamplerShader = globalThis.ColorAdjustmentsSamplerShader;
 export import ColorationVisionShader = globalThis.ColorationVisionShader;
 export import Combat = globalThis.Combat;
@@ -119,8 +117,7 @@ export import DepthSamplerShader = globalThis.DepthSamplerShader;
 export import DetectionMode = globalThis.DetectionMode;
 export import Dialog = globalThis.Dialog;
 export import DiceConfig = globalThis.DiceConfig;
-export import DirectoryApplicationMixin = globalThis.DirectoryApplicationMixin;
-export import DirectoryCollectionMixin = globalThis.DirectoryCollectionMixin;
+export import DirectoryCollection = globalThis.DirectoryCollection;
 export import DocumentCollection = globalThis.DocumentCollection;
 export import DocumentDirectory = globalThis.DocumentDirectory;
 export import DocumentOwnershipConfig = globalThis.DocumentOwnershipConfig;
@@ -259,7 +256,6 @@ export import RegionDocument = globalThis.RegionDocument;
 export import RegionLayer = globalThis.RegionLayer;
 export import RegionShader = globalThis.RegionShader;
 export import RenderFlag = globalThis.RenderFlag;
-export import RenderFlagsMixin = globalThis.RenderFlagsMixin;
 export import RenderedCanvasGroup = globalThis.RenderedCanvasGroup;
 export import ResizeHandle = globalThis.ResizeHandle;
 export import RevolvingColorationShader = globalThis.RevolvingColorationShader;
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 5ea6c7198..ba386ad68 100644
--- a/src/foundry/client-esm/applications/api/handlebars-application.d.mts
+++ b/src/foundry/client-esm/applications/api/handlebars-application.d.mts
@@ -4,16 +4,11 @@ import type ApplicationV2 from "./application.d.mts";
 /**
  * Augment an Application class with [Handlebars](https://handlebarsjs.com) template rendering behavior.
  */
-declare function HandlebarsApplicationMixin<BaseClass extends HandlebarsApplicationMixin.BaseClass>(
+declare function HandlebarsApplicationMixin<BaseClass extends ApplicationV2.Internal.Constructor>(
   BaseApplication: BaseClass,
 ): Mixin<typeof HandlebarsApplicationMixin.HandlebarsApplication, BaseClass>;
 
 declare namespace HandlebarsApplicationMixin {
-  type AnyMixedConstructor = ReturnType<typeof HandlebarsApplicationMixin<BaseClass>>;
-  interface AnyMixed extends AnyMixedConstructor {}
-
-  type BaseClass = ApplicationV2.Internal.Constructor;
-
   interface PartState {
     scrollPositions: Array<[el1: HTMLElement, scrollTop: number, scrollLeft: number]>;
     focus?: string | undefined;
diff --git a/src/foundry/client-esm/canvas/edges/collision.d.mts b/src/foundry/client-esm/canvas/edges/collision.d.mts
index 90133d264..0203ed597 100644
--- a/src/foundry/client-esm/canvas/edges/collision.d.mts
+++ b/src/foundry/client-esm/canvas/edges/collision.d.mts
@@ -1,4 +1,3 @@
-import type Edge from "./edge.d.mts";
 /**
  * A specialized object that contains the result of a collision in the context of the ClockwiseSweepPolygon.
  * This class is not designed or intended for use outside of that context.
@@ -8,8 +7,8 @@ declare class CollisionResult {
   constructor(values?: {
     target?: foundry.canvas.edges.PolygonVertex;
     collisions?: foundry.canvas.edges.PolygonVertex[];
-    cwEdges?: Set<Edge>;
-    ccwEdges?: Set<Edge>;
+    cwEdges?: EdgeSet;
+    ccwEdges?: EdgeSet;
     isBehind?: boolean;
     isLimited?: boolean;
     wasLimited?: boolean;
@@ -31,13 +30,13 @@ declare class CollisionResult {
    * The set of edges connected to the target vertex that continue clockwise
    * @defaultValue `new Set()`
    */
-  cwEdges: Set<Edge>;
+  cwEdges: EdgeSet;
 
   /**
    * The set of edges connected to the target vertex that continue counter-clockwise
    * @defaultValue `new Set()`
    */
-  ccwEdges: Set<Edge>;
+  ccwEdges: EdgeSet;
 
   /**
    * Is the target vertex for this result behind some closer active edge?
diff --git a/src/foundry/client-esm/canvas/edges/vertex.d.mts b/src/foundry/client-esm/canvas/edges/vertex.d.mts
index 774ec1672..641b259e9 100644
--- a/src/foundry/client-esm/canvas/edges/vertex.d.mts
+++ b/src/foundry/client-esm/canvas/edges/vertex.d.mts
@@ -25,19 +25,19 @@ declare class PolygonVertex {
    * This set is initially empty and populated later after vertices are de-duplicated.
    * @defaultValue `new Set()`
    */
-  edges: Set<Edge>;
+  edges: EdgeSet;
 
   /**
    * The subset of edges which continue clockwise from this vertex.
    * @defaultValue `new Set()`
    */
-  cwEdges: Set<Edge>;
+  cwEdges: EdgeSet;
 
   /**
    * The subset of edges which continue counter-clockwise from this vertex.
    * @defaultValue `new Set()`
    */
-  ccwEdges: Set<Edge>;
+  ccwEdges: EdgeSet;
 
   /**
    * The set of vertices collinear to this vertex
diff --git a/src/foundry/client-esm/canvas/sources/point-darkness-source.d.mts b/src/foundry/client-esm/canvas/sources/point-darkness-source.d.mts
index f46327367..591171bbc 100644
--- a/src/foundry/client-esm/canvas/sources/point-darkness-source.d.mts
+++ b/src/foundry/client-esm/canvas/sources/point-darkness-source.d.mts
@@ -62,7 +62,7 @@ declare class PointDarknessSource<
 
   override _configure(changes: IntentionalPartial<SourceData>): void;
 
-  override _getPolygonConfiguration(): PointSourcePolygon.Config;
+  override _getPolygonConfiguration(): PointSourcePolygonConfig;
 
   override _drawMesh(layerId: string): PIXI.Mesh | null;
 
diff --git a/src/foundry/client-esm/canvas/sources/point-effect-source.d.mts b/src/foundry/client-esm/canvas/sources/point-effect-source.d.mts
index ada8f3d19..ddb4e9dd8 100644
--- a/src/foundry/client-esm/canvas/sources/point-effect-source.d.mts
+++ b/src/foundry/client-esm/canvas/sources/point-effect-source.d.mts
@@ -37,7 +37,8 @@ declare class PointEffectSource {
   /**
    * Configure the parameters of the polygon that is generated for this source.
    */
-  protected _getPolygonConfiguration(): PointSourcePolygon.Config;
+  //TODO: Make sure this is accurate as part of work on "pixi leftovers"
+  protected _getPolygonConfiguration(): PointSourcePolygonConfig;
 
   _createShapes(): void;
 
@@ -64,15 +65,12 @@ declare class PointEffectSource {
  * TODO - documentation required about what a PointEffectSource is.
  * @privateRemarks the TODO is from foundry, update this class whenever the comments are done
  */
-declare function PointEffectSourceMixin<BaseClass extends PointEffectSourceMixin.BaseClass>(
+declare function PointEffectSourceMixin<BaseClass extends BaseEffectSource.AnyConstructor>(
   Base: BaseClass,
 ): Mixin<typeof PointEffectSource, BaseClass>;
 
 declare namespace PointEffectSourceMixin {
-  type AnyMixedConstructor = ReturnType<typeof PointEffectSourceMixin<BaseClass>>;
-  interface AnyMixed extends AnyMixedConstructor {}
-
-  type BaseClass = BaseEffectSource.AnyConstructor;
+  type AnyMixed = ReturnType<typeof PointEffectSourceMixin<BaseEffectSource.AnyConstructor>>;
 
   type MixedSourceData = SourceData & BaseEffectSource.SourceData;
 
diff --git a/src/foundry/client-esm/canvas/sources/point-light-source.d.mts b/src/foundry/client-esm/canvas/sources/point-light-source.d.mts
index 4d56aca10..87036fd52 100644
--- a/src/foundry/client-esm/canvas/sources/point-light-source.d.mts
+++ b/src/foundry/client-esm/canvas/sources/point-light-source.d.mts
@@ -24,7 +24,7 @@ declare class PointLightSource<
 
   override _configure(changes: IntentionalPartial<SourceData>): void;
 
-  override _getPolygonConfiguration(): PointSourcePolygon.Config;
+  override _getPolygonConfiguration(): PointSourcePolygonConfig;
 
   /**
    * Test whether this LightSource provides visibility to see a certain target object.
diff --git a/src/foundry/client-esm/canvas/sources/point-sound-source.d.mts b/src/foundry/client-esm/canvas/sources/point-sound-source.d.mts
index b62420ddb..389c19057 100644
--- a/src/foundry/client-esm/canvas/sources/point-sound-source.d.mts
+++ b/src/foundry/client-esm/canvas/sources/point-sound-source.d.mts
@@ -20,7 +20,7 @@ declare class PointSoundSource<
 
   override get effectsCollection(): Collection<this>;
 
-  override _getPolygonConfiguration(): PointSourcePolygon.Config;
+  override _getPolygonConfiguration(): PointSourcePolygonConfig;
 
   /**
    * Get the effective volume at which an AmbientSound source should be played for a certain listener.
diff --git a/src/foundry/client-esm/canvas/sources/point-vision-source.d.mts b/src/foundry/client-esm/canvas/sources/point-vision-source.d.mts
index db278c2a3..cf04b71ef 100644
--- a/src/foundry/client-esm/canvas/sources/point-vision-source.d.mts
+++ b/src/foundry/client-esm/canvas/sources/point-vision-source.d.mts
@@ -127,7 +127,7 @@ declare class PointVisionSource<
 
   override _configureLayer(layer: RenderedEffectSource.SourceLayer, layerId: string): void;
 
-  override _getPolygonConfiguration(): PointSourcePolygon.Config;
+  override _getPolygonConfiguration(): PointSourcePolygonConfig;
 
   /**
    * Creates the polygon that represents light perception.
diff --git a/src/foundry/client/apps/sidebar/directory-tab-mixin.d.mts b/src/foundry/client/apps/sidebar/directory-tab-mixin.d.mts
index f45ebe969..493340408 100644
--- a/src/foundry/client/apps/sidebar/directory-tab-mixin.d.mts
+++ b/src/foundry/client/apps/sidebar/directory-tab-mixin.d.mts
@@ -270,14 +270,7 @@ declare global {
     sort?: string;
   }
 
-  function DirectoryApplicationMixin<BaseApplication extends DirectoryApplicationMixin.BaseClass>(
+  function DirectoryApplicationMixin<BaseApplication extends Application.AnyConstructor>(
     Base: BaseApplication,
   ): Mixin<typeof DirectoryApplication, BaseApplication>;
-
-  namespace DirectoryApplicationMixin {
-    type AnyMixedConstructor = ReturnType<typeof DirectoryApplicationMixin<BaseClass>>;
-    interface AnyMixed extends AnyMixedConstructor {}
-
-    type BaseClass = Application.AnyConstructor;
-  }
 }
diff --git a/src/foundry/client/apps/sidebar/tabs/playlists-directory.d.mts b/src/foundry/client/apps/sidebar/tabs/playlists-directory.d.mts
index fc94ce441..0e4b00269 100644
--- a/src/foundry/client/apps/sidebar/tabs/playlists-directory.d.mts
+++ b/src/foundry/client/apps/sidebar/tabs/playlists-directory.d.mts
@@ -93,7 +93,7 @@ declare global {
      * @param node - The tree leaf node being prepared
      * @internal
      */
-    protected _prepareTreeData(node: DirectoryCollectionMixin.TreeNode<Playlist.ConfiguredInstance>): void;
+    protected _prepareTreeData(node: DirectoryCollection.TreeNode<Playlist.ConfiguredInstance>): void;
 
     /**
      * Create an object of rendering data for each Playlist document being displayed
diff --git a/src/foundry/client/core/packages.d.mts b/src/foundry/client/core/packages.d.mts
index 383852e50..f78d84181 100644
--- a/src/foundry/client/core/packages.d.mts
+++ b/src/foundry/client/core/packages.d.mts
@@ -136,17 +136,10 @@ declare global {
    * @param BasePackage - The parent BasePackage class being mixed
    * @returns A BasePackage subclass mixed with ClientPackage features
    */
-  function ClientPackageMixin<BaseClass extends ClientPackageMixin.BaseClass>(
+  function ClientPackageMixin<BaseClass extends BasePackage.Internal.Constructor>(
     BasePackage: BaseClass,
   ): Mixin<typeof ClientPackage, BaseClass>;
 
-  namespace ClientPackageMixin {
-    type AnyMixedConstructor = ReturnType<typeof ClientPackageMixin<BaseClass>>;
-    interface AnyMixed extends AnyMixedConstructor {}
-
-    type BaseClass = BasePackage.Internal.Constructor;
-  }
-
   class Module extends ClientPackageMixin(foundry.packages.BaseModule) {
     constructor(data: ClientPackage.ModuleConstructorData, options: unknown);
 
diff --git a/src/foundry/client/data/abstract/directory-collection-mixin.d.mts b/src/foundry/client/data/abstract/directory-collection-mixin.d.mts
index afc27fed3..1be4b46a1 100644
--- a/src/foundry/client/data/abstract/directory-collection-mixin.d.mts
+++ b/src/foundry/client/data/abstract/directory-collection-mixin.d.mts
@@ -1,7 +1,7 @@
 import type { Mixin } from "fvtt-types/utils";
 import type Document from "../../../common/abstract/document.d.mts";
 
-type DirectoryCollectionMixin_DocumentCollection_Static = DirectoryCollection<DirectoryCollectionMixin.DirectoryTypes> &
+type DirectoryCollectionMixin_DocumentCollection_Static = DirectoryCollection<DirectoryCollection.DirectoryTypes> &
   DocumentCollection<Document.AnyConstructor, string>;
 
 export interface DirectoryCollectionMixin_DocumentCollection_Interface
@@ -11,7 +11,7 @@ export interface DirectoryCollectionMixin_DocumentCollection_Interface
   ): DirectoryCollection<Document.ToConfiguredInstance<T>> & DocumentCollection<Document.ToConfiguredClass<T>, Name>;
 }
 
-type DirectoryCollectionMixin_Collection_Static = DirectoryCollection<DirectoryCollectionMixin.DirectoryTypes> &
+type DirectoryCollectionMixin_Collection_Static = DirectoryCollection<DirectoryCollection.DirectoryTypes> &
   Collection<CompendiumCollection<CompendiumCollection.Metadata>>;
 
 export interface DirectoryCollectionMixin_Collection_Interface extends DirectoryCollectionMixin_Collection_Static {
@@ -25,7 +25,7 @@ export interface DirectoryCollectionMixin_Collection_Interface extends Directory
  * An extension of the Collection class which adds behaviors specific to tree-based collections of entries and folders.
  */
 // TODO: T should probably extend a subset of documents | CompendiumCollection
-declare class DirectoryCollection<T extends DirectoryCollectionMixin.DirectoryTypes> {
+declare class DirectoryCollection<T extends DirectoryCollection.DirectoryTypes> {
   /** @privateRemarks All mixin classses need a constructor like this */
   constructor(...args: any[]);
 
@@ -37,7 +37,7 @@ declare class DirectoryCollection<T extends DirectoryCollectionMixin.DirectoryTy
   /**
    * The built tree structure of the DocumentCollection
    */
-  get tree(): DirectoryCollectionMixin.TreeNode<T>;
+  get tree(): DirectoryCollection.TreeNode<T>;
 
   /**
    * The current search mode for this collection
@@ -89,8 +89,8 @@ declare class DirectoryCollection<T extends DirectoryCollectionMixin.DirectoryTy
    * @returns The sort order between entries a and b
    */
   protected static _sortAlphabetical(
-    a: DirectoryCollectionMixin.AlphabeticalSortEntry,
-    b: DirectoryCollectionMixin.AlphabeticalSortEntry,
+    a: DirectoryCollection.AlphabeticalSortEntry,
+    b: DirectoryCollection.AlphabeticalSortEntry,
   ): number;
 
   /**
@@ -100,8 +100,8 @@ declare class DirectoryCollection<T extends DirectoryCollectionMixin.DirectoryTy
    * @returns The sort order between Entries a and b
    */
   protected static _sortStandard(
-    a: DirectoryCollectionMixin.StandardSortEntry,
-    b: DirectoryCollectionMixin.StandardSortEntry,
+    a: DirectoryCollection.StandardSortEntry,
+    b: DirectoryCollection.StandardSortEntry,
   ): number;
 }
 
@@ -112,17 +112,11 @@ declare global {
    * @returns A Collection mixed with DirectoryCollection functionality
    */
   function DirectoryCollectionMixin<
-    T extends DirectoryCollectionMixin.DirectoryTypes,
-    BaseCollection extends DirectoryCollectionMixin.BaseClass,
+    T extends DirectoryCollection.DirectoryTypes,
+    BaseCollection extends foundry.utils.Collection.AnyConstructor,
   >(BaseCollection: BaseCollection): Mixin<typeof DirectoryCollection<T>, BaseCollection>;
 
-  namespace DirectoryCollectionMixin {
-    type AnyMixedConstructor = ReturnType<
-      typeof DirectoryCollectionMixin<DirectoryCollectionMixin.DirectoryTypes, DirectoryCollectionMixin.BaseClass>
-    >;
-    interface AnyMixed extends AnyMixedConstructor {}
-
-    type BaseClass = foundry.utils.Collection.AnyConstructor;
+  namespace DirectoryCollection {
     // TODO: Refine type based on CONST.FOLDER_DOCUMENT_TYPES
     type DirectoryTypes = object;
 
diff --git a/src/foundry/client/data/collections/compendium-packs.d.mts b/src/foundry/client/data/collections/compendium-packs.d.mts
index 44adae4d7..3a99d2333 100644
--- a/src/foundry/client/data/collections/compendium-packs.d.mts
+++ b/src/foundry/client/data/collections/compendium-packs.d.mts
@@ -18,7 +18,7 @@ declare global {
   }
 
   namespace CompendiumPacks {
-    interface AlphabeticalSortEntry extends DirectoryCollectionMixin.AlphabeticalSortEntry {
+    interface AlphabeticalSortEntry extends DirectoryCollection.AlphabeticalSortEntry {
       metadata?: {
         label: string;
       };
diff --git a/src/foundry/client/pixi/board.d.mts b/src/foundry/client/pixi/board.d.mts
index 3e50b6213..d86f899bc 100644
--- a/src/foundry/client/pixi/board.d.mts
+++ b/src/foundry/client/pixi/board.d.mts
@@ -781,8 +781,6 @@ declare global {
      */
     type PointArray = [x: number, y: number];
 
-    type PairOfPointsArray = [x0: number, y0: number, x1: number, y1: number];
-
     /**
      * A standard rectangle interface.
      * @remarks Copied from `resources/app/common/types.mjs`
diff --git a/src/foundry/client/pixi/core/containers/full-canvas-container.d.mts b/src/foundry/client/pixi/core/containers/full-canvas-container.d.mts
index 84b066f5d..d9a7fa1fb 100644
--- a/src/foundry/client/pixi/core/containers/full-canvas-container.d.mts
+++ b/src/foundry/client/pixi/core/containers/full-canvas-container.d.mts
@@ -20,6 +20,9 @@ declare global {
   ): Mixin<typeof FullCanvasObject, BaseClass>;
 
   namespace FullCanvasObjectMixin {
+    interface Any extends AnyFullCanvasObject {}
+    type AnyConstructor = typeof AnyFullCanvasObject;
+
     type AnyMixedConstructor = ReturnType<typeof FullCanvasObjectMixin<BaseClass>>;
     interface AnyMixed extends AnyMixedConstructor {}
 
@@ -32,3 +35,7 @@ declare global {
    */
   class FullCanvasContainer extends FullCanvasObjectMixin(PIXI.Container) {}
 }
+
+declare abstract class AnyFullCanvasObject extends FullCanvasObject {
+  constructor(arg0: never, ...args: never[]);
+}
diff --git a/src/foundry/client/pixi/core/interaction/render-flags.d.mts b/src/foundry/client/pixi/core/interaction/render-flags.d.mts
index c0f3c62dd..12af56c03 100644
--- a/src/foundry/client/pixi/core/interaction/render-flags.d.mts
+++ b/src/foundry/client/pixi/core/interaction/render-flags.d.mts
@@ -122,14 +122,7 @@ declare global {
    * @param Base - The base class being mixed. Normally a PIXI.DisplayObject
    * @returns The mixed class definition
    */
-  function RenderFlagsMixin<BaseClass extends RenderFlagsMixin.BaseClass>(
+  function RenderFlagsMixin<BaseClass extends AnyConstructor>(
     Base: BaseClass,
   ): Mixin<typeof RenderFlagObject, BaseClass>;
-
-  namespace RenderFlagsMixin {
-    type AnyMixedConstructor = ReturnType<typeof RenderFlagsMixin<BaseClass>>;
-    interface AnyMixed extends AnyMixedConstructor {}
-
-    type BaseClass = AnyConstructor;
-  }
 }
diff --git a/src/foundry/client/pixi/core/shapes/limited-angle-polygon.d.mts b/src/foundry/client/pixi/core/shapes/limited-angle-polygon.d.mts
index 4899d9528..702e3ce50 100644
--- a/src/foundry/client/pixi/core/shapes/limited-angle-polygon.d.mts
+++ b/src/foundry/client/pixi/core/shapes/limited-angle-polygon.d.mts
@@ -1,4 +1,4 @@
-import type { InexactPartial } from "../../../../../utils/index.d.mts";
+export {};
 
 declare global {
   /**
@@ -6,12 +6,12 @@ declare global {
    * The shape is defined by a point origin, radius, angle, and rotation.
    * The shape is further customized by a configurable density which informs the approximation.
    * An optional secondary externalRadius can be provided which adds supplementary visibility outside the primary angle.
-   * @param origin - The origin point for this polygon
-   * @param config - Configuration for the polygon.
-   * @remarks Despite `config` being an `={}` parameter, the `radius` key must be passed to avoid `NaN`s
    */
   class LimitedAnglePolygon extends PIXI.Polygon {
-    constructor(origin: Canvas.Point, config: LimitedAnglePolygon.ConstructorOptions);
+    constructor(
+      origin: Canvas.Point,
+      { radius, angle, rotation, density, externalRadius }: LimitedAnglePolygon.ConstructorOptions,
+    );
 
     /**
      * The origin point of the Polygon
@@ -59,12 +59,6 @@ declare global {
      */
     aMax: number;
 
-    /**
-     * The bounding box of the circle defined by the externalRadius, if any
-     * @privateRemarks Set in `##generatePoints`, which is called at the end of the constructor
-     */
-    externalBounds: PIXI.Rectangle;
-
     /**
      * Restrict the edges which should be included in a PointSourcePolygon based on this specialized shape.
      * We use two tests to jointly keep or reject edges.
@@ -73,9 +67,9 @@ declare global {
      * @param a - The first edge vertex
      * @param b - The second edge vertex
      * @returns Should the edge be included in the PointSourcePolygon computation?
-     * @remarks Foundry marked `@internal`
+     * @internal
      */
-    _includeEdge(a: Canvas.Point, b: Canvas.Point): boolean;
+    protected _includeEdge(a: Canvas.Point, b: Canvas.Point): boolean;
 
     /**
      * Test whether a vertex lies between two boundary rays.
@@ -91,49 +85,35 @@ declare global {
   }
 
   namespace LimitedAnglePolygon {
-    interface Any extends AnyLimitedAnglePolygon {}
-    type AnyConstructor = typeof AnyLimitedAnglePolygon;
+    interface ConstructorOptions {
+      /**
+       * The radius of the emitted cone.
+       */
+      radius: number;
 
-    /** @internal */
-    type _ConstructorOptions = InexactPartial<{
       /**
        * The angle of the Polygon in degrees.
        * @defaultValue `360`
-       * @remarks Can't be `null` as it only has a parameter default
        */
-      angle: number;
+      angle?: number;
 
       /**
        * The direction of rotation at the center of the emitted angle in degrees.
        * @defaultValue `0`
-       * @remarks Can't be `null` as it only has a parameter default
        */
-      rotation: number;
+      rotation?: number;
 
       /**
        * The density of rays which approximate the cone, defined as rays per PI.
        * @defaultValue `PIXI.Circle.approximateVertexDensity(this.radius)`
        */
-      density: number | null;
+      density?: number;
 
       /**
        * An optional "external radius" which is included in the polygon for the supplementary area outside the cone.
        * @defaultValue `0`
-       * @remarks Only used if truthy
        */
-      externalRadius: number | null;
-    }>;
-
-    interface ConstructorOptions extends _ConstructorOptions {
-      /**
-       * The radius of the emitted cone.
-       * @privateRemarks This is given no default, but is directly used in multiplication and division, resulting in `NaN` if allowed to be `undefined`
-       */
-      radius: number;
+      externalRadius?: number;
     }
   }
 }
-
-declare abstract class AnyLimitedAnglePolygon extends LimitedAnglePolygon {
-  constructor(arg0: never, ...args: never[]);
-}
diff --git a/src/foundry/client/pixi/core/shapes/polygon-mesher.d.mts b/src/foundry/client/pixi/core/shapes/polygon-mesher.d.mts
index d153a77b8..fb4f14d94 100644
--- a/src/foundry/client/pixi/core/shapes/polygon-mesher.d.mts
+++ b/src/foundry/client/pixi/core/shapes/polygon-mesher.d.mts
@@ -1,4 +1,4 @@
-import type { IntentionalPartial } from "fvtt-types/utils";
+import type { InexactPartial } from "fvtt-types/utils";
 
 declare global {
   /**
@@ -10,13 +10,14 @@ declare global {
      * @param poly    - Closed polygon to be processed and converted to a mesh
      *                  (array of points or PIXI Polygon)
      * @param options - Various options : normalizing, offsetting, add depth, ...
-     * @remarks `options` is `IntentionalPartial`'d because the constructor immediately does
-     * `this.options = {...this.constructor._defaultOptions, ...options}`, so explicit `undefined` would break things
      */
-    constructor(poly: PIXI.Polygon.OrPointsFlat, options?: IntentionalPartial<PolygonMesher.Options>);
+    constructor(poly: number[] | PIXI.Polygon, options?: InexactPartial<PolygonMesherOptions>);
+
+    /** Contains options to apply during the meshing process */
+    options: PolygonMesherOptions;
 
     /** Default options values */
-    static _defaultOptions: PolygonMesher.Options;
+    static _defaultOptions: PolygonMesherOptions;
 
     /**
      * Polygon mesh vertices
@@ -28,20 +29,14 @@ declare global {
      */
     indices: number[];
 
-    /** Contains options to apply during the meshing process */
-    options: PolygonMesher.Options;
-
     /**
      * Convert a flat points array into a 2 dimensional ClipperLib path
      * @param poly      - PIXI.Polygon or points flat array.
      * @param dimension - Dimension.
      *                    (default 2)
      * @returns The clipper lib path.
-     * @throws If `dimension < 2`
-     * @privateRemarks Foundry types this return as `number[] | undefined`, but it cannot return either of those;
-     * Either it will throw or return a (possibly empty) `ClipperLib.Path` (an array-like of `ClipperLib.IntPoint`s)
      */
-    static getClipperPathFromPoints(poly: PIXI.Polygon.OrPointsFlat, dimension?: number): ClipperLib.Path;
+    static getClipperPathFromPoints(poly: number[] | PIXI.Polygon, dimension?: number): number[] | undefined;
 
     /**
      * Execute the triangulation to create indices
@@ -51,88 +46,65 @@ declare global {
     triangulate(geometry: PIXI.Geometry): PIXI.Geometry;
   }
 
-  namespace PolygonMesher {
-    interface Any extends AnyPolygonMesher {}
-    type AnyConstructor = typeof AnyPolygonMesher;
+  interface PolygonMesherOptions {
+    /**
+     * The position value in pixels
+     * @defaultValue `0`
+     */
+    offset: number;
 
     /**
-     *  @remarks These properties all have non-nullish values in `_defaultOptions`, and explicit `undefined` breaks
-     * things that aren't `boolean` due to math and object spread syntax in the constructor. `null` has been allowed
-     * where its casting to `0` or `false` doesn't break things.
+     * Should the vertices be normalized?
+     * @defaultValue `false`
      */
-    interface Options {
-      /**
-       * The position value in pixels
-       * @defaultValue `0`
-       * @remarks Can't be `undefined` because the default is provided by spread operator and the value is used directly in math
-       */
-      offset: number | null;
-
-      /**
-       * Should the vertices be normalized?
-       * @defaultValue `false`
-       */
-      normalize: boolean | undefined | null;
-
-      /**
-       * The x origin
-       * @defaultValue `0`
-       * @remarks Can't be `undefined` because the default is provided by spread operator and the value is used directly in math
-       */
-      x: number | null;
-
-      /**
-       * The y origin
-       * @defaultValue `0`
-       * @remarks Can't be `undefined` because the default is provided by spread operator and the value is used directly in math
-       */
-      y: number | null;
-
-      /**
-       * The radius
-       * @defaultValue `0`
-       * @remarks Can't be `null` because of an `=== 0` check, nor `undefined` because the default is provided by spread operator and the value is used directly in math
-       */
-      radius: number;
-
-      /**
-       * The depth value on the outer polygon
-       * @defaultValue `0`
-       * @remarks Can't be `null` as it can be pushed directly into a `number[]`, nor `undefined` because the default is provided by spread operator and the value is used directly in math
-       */
-      depthOuter: number;
-
-      /**
-       * The depth value on the inner polygon
-       * @defaultValue `1`
-       * @remarks Can't be `undefined` because the default is provided by spread operator and the value is used directly in math
-       */
-      depthInner: number | null;
-
-      /**
-       * Constant multiplier to avoid floating point imprecision with ClipperLib
-       * @defaultValue `10e8`
-       * @remarks Not allowing `null` because a zero value here defeats the purpose, and `undefined` because the default is provided by spread operator and the value is used directly in math
-       */
-      scale: number;
-
-      /**
-       * Distance of the miter limit, when sharp angles are cut during offsetting.
-       * @defaultValue `7`
-       * @remarks Allowed to be `undefined` but not `null` because it is passed to
-       * `new ClipperLib.ClipperOffset()`, which provides its own default if `=== undefined`
-       */
-      miterLimit: number | undefined;
-
-      /**
-       * Should the vertex data be interleaved into one VBO?
-       * @defaultValue `false`
-       */
-      interleaved: boolean | undefined | null;
-    }
-  }
-}
+    normalize: boolean;
+
+    /**
+     * The x origin
+     * @defaultValue `0`
+     */
+    x: number;
+
+    /**
+     * The y origin
+     * @defaultValue `0`
+     */
+    y: number;
+
+    /**
+     * The radius
+     * @defaultValue `0`
+     */
+    radius: number;
+
+    /**
+     * The depth value on the outer polygon
+     * @defaultValue `0`
+     */
+    depthOuter: number;
+
+    /**
+     * The depth value on the inner polygon
+     * @defaultValue `1`
+     */
+    depthInner: number;
+
+    /**
+     * Constant multiplier to avoid floating point imprecision with ClipperLib
+     * @defaultValue `10e8`
+     */
+    scale: number;
+
+    /**
+     * Distance of the miter limit, when sharp angles are cut during offsetting.
+     * @defaultValue `7`
+     */
+    miterLimit: number;
 
-declare abstract class AnyPolygonMesher extends PolygonMesher {
-  constructor(arg0: never, ...args: never[]);
+    /**
+     * Should the vertex data be interleaved into one VBO?
+     * @defaultValue `false`
+     */
+    interleaved: boolean;
+  }
 }
diff --git a/src/foundry/client/pixi/core/shapes/precise-text.d.mts b/src/foundry/client/pixi/core/shapes/precise-text.d.mts
index c59e584af..01ea32ba0 100644
--- a/src/foundry/client/pixi/core/shapes/precise-text.d.mts
+++ b/src/foundry/client/pixi/core/shapes/precise-text.d.mts
@@ -1,4 +1,4 @@
-import type { InexactPartial, NullishProps } from "fvtt-types/utils";
+export {};
 
 declare global {
   /**
@@ -6,40 +6,22 @@ declare global {
    * At default resolution Text often looks blurry or fuzzy.
    */
   class PreciseText extends PIXI.Text {
+    /**
+     * @param options - Additional options merged with the default TextStyle
+     */
     constructor(...args: ConstructorParameters<typeof PIXI.Text>);
 
-    /** @defaultValue `false` */
-    override _autoResolution: boolean;
-
-    /** @defaultValue `2` */
-    override _resolution: number;
     /**
      * Prepare a TextStyle object which merges the canvas defaults with user-provided options
      * @param anchor  - A text anchor point from CONST.TEXT_ANCHOR_POINTS
      * @param options - Additional options merged with the default TextStyle
      * @returns The prepared TextStyle
      */
-    static getTextStyle({ anchor, ...options }?: PreciseText.GetTextStyleOptions): PIXI.TextStyle;
+    static getTextStyle({
+      anchor,
+      ...options
+    }?: { anchor?: foundry.CONST.TEXT_ANCHOR_POINTS } & ConstructorParameters<
+      typeof PIXI.TextStyle
+    >[0]): PIXI.TextStyle;
   }
-
-  namespace PreciseText {
-    interface Any extends AnyPreciseText {}
-    type AnyConstructor = typeof AnyPreciseText;
-
-    /** @internal */
-    type _GetTextStyleOptions = NullishProps<{
-      /**
-       * A text anchor point from CONST.TEXT_ANCHOR_POINTS
-       * @remarks Only checked againt `.RIGHT` and `.LEFT`, and only if an `align` key is omitted
-       */
-      anchor: foundry.CONST.TEXT_ANCHOR_POINTS;
-    }> &
-      // Can't be NullishProps because keys are only checked for `!== undefined` in PIXI
-      InexactPartial<PIXI.ITextStyle>;
-    interface GetTextStyleOptions extends _GetTextStyleOptions {}
-  }
-}
-
-declare abstract class AnyPreciseText extends PreciseText {
-  constructor(arg0: never, ...args: never[]);
 }
diff --git a/src/foundry/client/pixi/core/shapes/ray.d.mts b/src/foundry/client/pixi/core/shapes/ray.d.mts
index 7dc3c9764..66a3211a0 100644
--- a/src/foundry/client/pixi/core/shapes/ray.d.mts
+++ b/src/foundry/client/pixi/core/shapes/ray.d.mts
@@ -71,14 +71,14 @@ declare global {
     /**
      * The cached angle, computed lazily in Ray#angle
      * @defaultValue `undefined`
-     * @privateRemarks Foundry marked `@private` and doesn't type the `| undefined`
+     * @internal
      */
     protected _angle: number | undefined;
 
     /**
      * The cached distance, computed lazily in Ray#distance
      * @defaultValue `undefined`
-     * @privateRemarks Foundry marked `@private` and doesn't type the `| undefined`
+     * @internal
      */
     protected _distance: number | undefined;
 
@@ -87,11 +87,10 @@ declare global {
      * The angle is computed lazily (only if required) and cached.
      */
     get angle(): number;
-
-    set angle(value);
+    set angle(value: number);
 
     /**
-     * A normalized bounding rectangle that encompasses the Ray
+     * A bounding rectangle that encompasses the Ray
      */
     get bounds(): PIXI.Rectangle;
 
@@ -100,8 +99,7 @@ declare global {
      * The distance is computed lazily (only if required) and cached.
      */
     get distance(): number;
-
-    set distance(value);
+    set distance(value: number);
 
     /**
      * A factory method to construct a Ray from an origin point, an angle, and a distance
@@ -127,7 +125,7 @@ declare global {
      * @param t - The distance along the Ray
      * @returns The coordinates of the projected point
      */
-    project(t: number): PIXI.IPointData;
+    project(t: number): { x: number; y: number };
 
     /**
      * Create a Ray by projecting a certain distance towards a known point.
@@ -156,28 +154,12 @@ declare global {
      * @param distance - A distance the new ray should project, otherwise uses the same distance.
      * @returns A new Ray with an offset angle
      */
-    shiftAngle(
-      offset: number,
-      /**
-       * @defaultValue `this.distance`
-       * @remarks Default provided by `||`, so `0` is effectively `this.distance`
-       */
-      distance?: number | null,
-    ): Ray;
+    shiftAngle(angleOffset: number, distance?: number): Ray;
 
     /**
      * Find the point I[x,y] and distance t* on ray R(t) which intersects another ray
      * @see foundry.utils.lineLineIntersection
      */
-    intersectSegment(coords: Canvas.PairOfPointsArray): LineIntersection | null;
-  }
-
-  namespace Ray {
-    interface Any extends AnyRay {}
-    type AnyConstructor = typeof AnyRay;
+    intersectSegment(coords: [x0: number, y0: number, x1: number, y1: number]): LineIntersection | null;
   }
 }
-
-declare abstract class AnyRay extends Ray {
-  constructor(arg0: never, ...args: never[]);
-}
diff --git a/src/foundry/client/pixi/core/shapes/source-polygon.d.mts b/src/foundry/client/pixi/core/shapes/source-polygon.d.mts
index af3d361a5..6319965df 100644
--- a/src/foundry/client/pixi/core/shapes/source-polygon.d.mts
+++ b/src/foundry/client/pixi/core/shapes/source-polygon.d.mts
@@ -1,20 +1,24 @@
-import type { Brand, InexactPartial, NullishProps } from "fvtt-types/utils";
+import type { InexactPartial, FixedInstanceType } from "fvtt-types/utils";
 import type PointEffectSourceMixin from "../../../../client-esm/canvas/sources/point-effect-source.d.mts";
 
 declare global {
+  interface PointSourcePolygonConfig extends PointSourcePolygon._Config {
+    /** The type of polygon being computed */
+    type: PointSourcePolygon.PolygonType;
+  }
+
   /**
    * An extension of the default PIXI.Polygon which is used to represent the line of sight for a point source.
    */
   abstract class PointSourcePolygon extends PIXI.Polygon {
-    /**
-     * @remarks This is protected because `new PointSourcePolygon` does not sufficiently initalize the class; Use the static `create` method instead.
-     */
-    protected constructor(...args: ConstructorParameters<typeof PIXI.Polygon>);
-
     /**
      * Customize how wall direction of one-way walls is applied
      */
-    static WALL_DIRECTION_MODES: PointSourcePolygon.WallDirectionModes;
+    static readonly WALL_DIRECTION_MODES: Readonly<{
+      NORMAL: 0;
+      REVERSED: 1;
+      BOTH: 2;
+    }>;
 
     /**
      * The rectangular bounds of this polygon
@@ -24,15 +28,14 @@ declare global {
 
     /**
      * The origin point of the source polygon.
-     * @remarks Not initalized to any value, but immediately set by `PointSourcePolygon#initalize`
      */
     origin: Canvas.Point;
 
     /**
      * The configuration of this polygon.
-     * @remarks Initialized as `{}` but immediately filled by `PointSourcePolygon#initalize`
+     * @defaultValue `{}`
      */
-    config: PointSourcePolygon.StoredConfig;
+    config: PointSourcePolygonConfig;
 
     /**
      * An indicator for whether this polygon is constrained by some boundary shape?
@@ -45,18 +48,20 @@ declare global {
      * @param origin     - The origin point to benchmark
      * @param config     - The polygon configuration to benchmark
      */
-    static benchmark(iterations: number, origin: Canvas.Point, config: PointSourcePolygon.Config): Promise<void>;
+    static benchmark(iterations: number, origin: Canvas.Point, config: PointSourcePolygonConfig): Promise<void>;
 
     /**
      * Compute the polygon given a point origin and radius
      * @param origin - The origin source point
      * @param config - Configuration options which customize the polygon computation
+     *                 (default: `{}`)
      * @returns The computed polygon instance
-     * @remarks Subclasses must implement a `.create` override to accurately type the return.
-     *
-     * Despite being a `={}` parameter, a `config` object with a valid `type` property must be passed
      */
-    static create(origin: Canvas.Point, config: PointSourcePolygon.Config): unknown;
+    static create<T extends PointSourcePolygon.AnyConstructor>(
+      this: T,
+      origin: Canvas.Point,
+      config?: Parameters<FixedInstanceType<NoInfer<T>>["initialize"]>[1],
+    ): FixedInstanceType<T>;
 
     /**
      * Create a clone of this polygon.
@@ -81,7 +86,7 @@ declare global {
      * @param origin - The provided polygon origin
      * @param config - The provided configuration object
      */
-    initialize(origin: Canvas.Point, config: PointSourcePolygon.Config): void;
+    initialize(origin: Canvas.Point, config: PointSourcePolygonConfig): void;
 
     /**
      * Apply a constraining boundary shape to an existing PointSourcePolygon.
@@ -91,16 +96,12 @@ declare global {
      * @param intersectionOptions - Options passed to the shape intersection method
      * @returns A new constrained polygon
      */
-    applyConstraint(constraint: PIXI.Polygon, intersectionOptions?: PIXI.Polygon.IntersectPolygonOptions): this;
-    applyConstraint(constraint: PIXI.Circle, intersectionOptions?: PIXI.Circle.WACIntersectPolygonOptions): this;
-    applyConstraint(constraint: PIXI.Circle, intersectionOptions?: PIXI.Circle.ClipperLibIntersectPolygonOptions): this;
-    applyConstraint(constraint: PIXI.Rectangle, intersectionOptions?: PIXI.Rectangle.WACIntersectPolygonOptions): this;
     applyConstraint(
-      constraint: PIXI.Rectangle,
-      intersectionOptions?: PIXI.Rectangle.ClipperLibIntersectPolygonOptions,
-    ): this;
+      constraint: PIXI.Circle | PIXI.Rectangle | PIXI.Polygon,
+      intersectionOptions?: Record<string, unknown>,
+    ): PointSourcePolygon;
 
-    override contains(x: number, y: number): boolean;
+    contains(x: number, y: number): boolean;
 
     /**
      * Constrain polygon points by applying boundary shapes.
@@ -123,7 +124,18 @@ declare global {
     static testCollision<Mode extends PointSourcePolygon.CollisionModes>(
       origin: Canvas.Point,
       destination: Canvas.Point,
-      { mode, ...config }: PointSourcePolygon.TestCollisionConfig<Mode>,
+      {
+        mode,
+
+        /** The configuration that defines a certain Polygon type */
+        ...config
+      }: {
+        /**
+         * The collision mode to test: "any", "all", or "closest"
+         * (default: "all")
+         */
+        mode?: Mode;
+      } & PointSourcePolygonConfig,
     ): PointSourcePolygon.TestCollision<Mode>;
 
     /**
@@ -153,9 +165,8 @@ declare global {
      * Augment a PointSourcePolygon by adding additional coverage for shapes permitted by threshold walls.
      * @param polygon - The computed polygon
      * @returns The augmented polygon
-     * @remarks Mutates and returns the same reference it's passed, not a new polygon
      */
-    static applyThresholdAttenuation<PolyType extends PointSourcePolygon>(polygon: PolyType): PolyType;
+    static applyThresholdAttenuation(polygon: PointSourcePolygon): PointSourcePolygon;
 
     /**
      * @deprecated since v11, will be removed in v13
@@ -168,109 +179,24 @@ declare global {
   }
 
   namespace PointSourcePolygon {
-    interface Any extends AnyPointSourcePolygon {}
     type AnyConstructor = typeof AnyPointSourcePolygon;
 
-    type WALL_DIRECTION_MODES = Brand<number, "PointSourcePolygon.WALL_DIRECTION_MODES">;
-
-    interface WallDirectionModes {
-      readonly NORMAL: 0 & WALL_DIRECTION_MODES;
-      readonly REVERSED: 1 & WALL_DIRECTION_MODES;
-      readonly BOTH: 2 & WALL_DIRECTION_MODES;
-    }
-
     /** @internal */
-    type _TestCollisionConfig<Mode> = InexactPartial<{
-      /**
-       * The collision mode to test: "any", "all", or "closest"
-       * @defaultValue `"all"`
-       * @remarks Can't be `null` as it only has a parameter default
-       */
-      mode: Mode;
-    }>;
-
-    interface TestCollisionConfig<Mode> extends _TestCollisionConfig<Mode>, Config {}
-
-    /**
-     * @internal
-     * @privateRemarks Properties of the config that get set in `#initialize` or elsewhere with no respect to their passed value
-     */
-    interface _ComputedConfig {
-      /**
-       * Does this polygon have a limited radius?
-       * @remarks `true` if `(cfg.radius > 0) && (cfg.radius < canvas.dimensions.maxR)`
-       */
-      hasLimitedRadius: boolean;
-
-      /**
-       * Does this polygon have a limited angle?
-       * @remarks `true` if `cfg.angle !== 360`
-       */
-      hasLimitedAngle: boolean;
-    }
-
-    /**
-     * @internal
-     * @privateRemarks Properties of the config that might be omitted but can't be explicitly `undefined`
-     */
-    interface _OptionalOnlyConfig {
-      /**
-       * The object (if any) that spawned this polygon.
-       * @remarks Not guaranteed by `PointSourcePolygon#initalize` but will exist in all configs created by `PointEffectSourceMixin` subclasses. No default provided
-       * @privateRemarks Foundry types this as `PointSource` which is neither a typedef nor a class, not even a mixin class name. The type here matches usage and tracks with what they probably meant.
-       */
-      source?: PointEffectSourceMixin.AnyMixed;
-
-      /**
-       * The external radius of the source
-       * @remarks Can't be `undefined` or `null` or its use in math would produce `NaN`s.
-       *
-       * Not guaranteed by `PointSourcePolygon#initalize` but will exist in all configs created by `PointEffectSourceMixin` subclasses.
-       */
-      externalRadius?: number;
-    }
-
-    /**
-     * @internal
-     * @privateRemarks Properties of the config that have defaults for nullish values in `#initialize`, and thus are guaranteed in the stored config
-     */
-    interface _BaseConfig {
-      /**
-       * A limited radius of the resulting polygon
-       * @defaultValue `canvas.dimensions.maxR`
-       */
-      radius: number;
+    type _Config = InexactPartial<{
+      /** The angle of emission, if limited */
+      angle: number;
 
-      /**
-       * The desired density of padding rays, a number per PI
-       * @defaultValue `PIXI.Circle.approximateVertexDensity(cfg.radius)`
-       */
+      /** The desired density of padding rays, a number per PI */
       density: number;
 
-      /**
-       * The angle of emission, if limited
-       * @defaultValue `360`
-       */
-      angle: number;
+      /** A limited radius of the resulting polygon */
+      radius: number;
 
-      /**
-       * The direction of facing, required if the angle is limited
-       * @defaultValue `0`
-       */
+      /** The direction of facing, required if the angle is limited */
       rotation: number;
 
-      /**
-       * Does this polygon use the Scene inner or outer bounding rectangle
-       * @defaultValue `true` if `type === "sight"` and the origin point is inside `canvas.dimensions.sceneRect` else `false`
-       * @remarks Computed if not provided or passed nullish.
-       */
-      useInnerBounds: boolean;
-
-      /**
-       * Customize how wall direction of one-way walls is applied
-       * @defaultValue `PointSourcePolygon.WALL_DIRECTION_MODES.NORMAL`
-       */
-      wallDirectionMode: PointSourcePolygon.WALL_DIRECTION_MODES;
+      /** Customize how wall direction of one-way walls is applied */
+      wallDirectionMode: number;
 
       /**
        * Compute the polygon with threshold wall constraints applied
@@ -284,53 +210,42 @@ declare global {
        */
       includeDarkness: boolean;
 
-      /**
-       * Limiting polygon boundary shapes
-       * @defaultValue `[]`
-       * @remarks Never passed in Foundry practice
-       */
-      boundaryShapes: Array<BoundaryShapes>;
+      /** Priority when it comes to ignore edges from darkness sources */
+      priority: number;
 
-      /**
-       * Display debugging visualization and logging for the polygon
-       * @remarks Overriden `true` if `CONFIG.debug.polygons` is truthy
-       */
-      debug?: boolean;
+      /** Display debugging visualization and logging for the polygon */
+      debug: boolean;
 
-      /**
-       * Priority when it comes to ignore edges from darkness sources
-       * @remarks This is listed in the typedef, but is not in use by Foundry in 12.331
-       */
-      priority?: number;
-    }
+      /** The object (if any) that spawned this polygon. */
+      source: PointEffectSourceMixin.AnyMixed;
 
-    /**
-     * @internal
-     * @privateRemarks The only property required in all configs
-     */
-    interface _RequiredConfig {
-      /** The type of polygon being computed */
-      type: PolygonType;
-    }
+      /** Limiting polygon boundary shapes */
+      boundaryShapes: Array<PIXI.Rectangle | PIXI.Circle | PIXI.Polygon>;
+
+      /** Does this polygon use the Scene inner or outer bounding rectangle */
+      readonly useInnerBounds: boolean;
 
-    interface StoredConfig extends _RequiredConfig, _BaseConfig, _OptionalOnlyConfig, _ComputedConfig {}
+      /** Does this polygon have a limited radius? */
+      readonly hasLimitedRadius: boolean;
 
-    interface Config extends _RequiredConfig, NullishProps<_BaseConfig>, _OptionalOnlyConfig {}
+      /** Does this polygon have a limited angle? */
+      readonly hasLimitedAngle: boolean;
 
-    type BoundaryShapes = PIXI.Rectangle | PIXI.Circle | PIXI.Polygon;
+      /** The computed bounding box for the polygon */
+      readonly boundingBox: PIXI.Rectangle;
+    }>;
 
     type PolygonType = "light" | "sight" | "sound" | "move" | "universal";
 
     type CollisionModes = "any" | "all" | "closest";
 
-    /** @internal */
-    interface _CollisionTypesReturnMap {
+    interface CollisionTypes {
       any: boolean;
-      closest: foundry.canvas.edges.PolygonVertex | null;
-      all: foundry.canvas.edges.PolygonVertex[];
+      closest: foundry.canvas.edges.PolygonVertex;
+      all: foundry.canvas.edges.PolygonVertex[] | null;
     }
 
-    type TestCollision<Mode extends CollisionModes> = _CollisionTypesReturnMap[Mode];
+    type TestCollision<Mode extends CollisionModes> = CollisionTypes[Mode];
   }
 }
 
diff --git a/src/foundry/client/pixi/extensions/polygon.d.mts b/src/foundry/client/pixi/extensions/polygon.d.mts
index 6ab369c4e..947b0bd44 100644
--- a/src/foundry/client/pixi/extensions/polygon.d.mts
+++ b/src/foundry/client/pixi/extensions/polygon.d.mts
@@ -70,7 +70,7 @@ declare global {
        * @param options - Options which configure how the intersection is computed
        * @returns The intersected polygon
        */
-      intersectPolygon(other: PIXI.Polygon, options?: PIXI.Polygon.IntersectPolygonOptions): PIXI.Polygon;
+      intersectPolygon(other: PIXI.Polygon, options?: PIXI.Polygon.IntersectClipperOptions): PIXI.Polygon;
 
       /**
        * Intersect this PIXI.Polygon with an array of ClipperPoints.
@@ -108,9 +108,6 @@ declare global {
     }
 
     namespace Polygon {
-      type OrPointsFlat = number[] | PIXI.Polygon;
-      type OrPoints = OrPointsFlat | PIXI.IPointData[];
-
       /** @privateRemarks Foundry uses this type instead of full `ClipperLib.IntPoint` objects */
       interface ClipperPoint {
         X: number;
@@ -137,12 +134,6 @@ declare global {
 
       interface IntersectClipperOptions extends _IntersectClipperOptions {}
 
-      /**
-       * @privateRemarks Separate interface despite identical keys for purposes of declaration merging
-       * and just having an expected name for external reference
-       */
-      interface IntersectPolygonOptions extends _IntersectClipperOptions {}
-
       interface ClipperPointsOptions extends Pick<PIXI.Polygon.IntersectClipperOptions, "scalingFactor"> {}
     }
 
diff --git a/src/foundry/client/pixi/perception/clockwise-sweep.d.mts b/src/foundry/client/pixi/perception/clockwise-sweep.d.mts
index 6d3b6a75e..de9658fc7 100644
--- a/src/foundry/client/pixi/perception/clockwise-sweep.d.mts
+++ b/src/foundry/client/pixi/perception/clockwise-sweep.d.mts
@@ -1,15 +1,12 @@
-import type { IntentionalPartial } from "fvtt-types/utils";
 import type Edge from "../../../client-esm/canvas/edges/edge.d.mts";
 
 declare global {
+  type VertexMap = Map<number, foundry.canvas.edges.PolygonVertex>;
+
+  type EdgeSet = Set<Edge>;
+
   interface PolygonRay extends Ray {
-    /**
-     * @remarks Only set in `ClockwiseSweepPolygon#_switchEdge` and only consumed in `#visualize`,
-     * despite unrelated method(s) having parameters claiming to want a `PolygonRay`
-     *
-     * Tested for truthiness in `#visualize` before use, so a nullish value is fine but never attains in core
-     */
-    result?: foundry.canvas.edges.CollisionResult | undefined | null;
+    result: foundry.canvas.edges.CollisionResult;
   }
 
   /**
@@ -18,21 +15,15 @@ declare global {
    * This algorithm was created with valuable contributions from https://github.com/caewok
    */
   class ClockwiseSweepPolygon extends PointSourcePolygon {
-    // This does not appear in Foundry code, it's a necessary type override
-    static override create(origin: Canvas.Point, config: PointSourcePolygon.Config): ClockwiseSweepPolygon;
-
-    // This does not appear in foundry code, it's a necessary type override
-    override config: ClockwiseSweepPolygon.StoredConfig;
-
     /**
      * A mapping of vertices which define potential collision points
      */
-    vertices: Map<number, foundry.canvas.edges.PolygonVertex>;
+    vertices: VertexMap;
 
     /**
      * The set of edges which define potential boundaries of the polygon
      */
-    edges: Set<Edge>;
+    edges: EdgeSet;
 
     /**
      * A collection of rays which are fired at vertices
@@ -40,7 +31,7 @@ declare global {
     // @ts-expect-error Getter/setter routine is deprecated functionality as of v11, removed in v13
     rays: PolygonRay[];
 
-    override initialize(origin: Canvas.Point, config?: PointSourcePolygon.Config): void;
+    override initialize(origin: Canvas.Point, config: PointSourcePolygonConfig): void;
 
     clone(): this;
 
@@ -55,7 +46,7 @@ declare global {
     /**
      * Determine the edge types and their manner of inclusion for this polygon instance
      */
-    protected _determineEdgeTypes(): ClockwiseSweepPolygon.DetermineEdgesReturn;
+    protected _determineEdgeTypes(): Record<Edge.EdgeTypes, 0 | 1 | 2>;
 
     /**
      * Test whether a wall should be included in the computed polygon for a given origin and type
@@ -66,7 +57,7 @@ declare global {
      */
     protected _testEdgeInclusion(
       edge: Edge,
-      edgeTypes: ClockwiseSweepPolygon.DetermineEdgesReturn,
+      edgeTypes: Record<Edge.EdgeTypes, 0 | 1 | 2>,
       bounds: PIXI.Rectangle,
     ): boolean;
 
@@ -84,25 +75,25 @@ declare global {
     /**
      * Add additional vertices for intersections between edges.
      */
-    protected _identifyIntersections(edgeMap: Map<string, Edge>): void;
+    protected _identifyIntersections(wallEdgeMap: Map<string, Edge>): void;
 
     /**
      * Execute the sweep over wall vertices
-     * @privateRemarks Foundry marked `@private`
+     * @internal
      */
     protected _executeSweep(): void;
 
     /**
      * Determine the initial set of active edges as those which intersect with the initial ray
      * @returns A set of initially active edges
-     * @privateRemarks Foundry marked `@private`
+     * @internal
      */
-    protected _initializeActiveEdges(): Set<Edge>;
+    protected _initializeActiveEdges(): EdgeSet;
 
     /**
      * Sort vertices clockwise from the initial ray (due west).
      * @returns The array of sorted vertices
-     * @privateRemarks Foundry marked `@private`
+     * @internal
      */
     protected _sortVertices(): foundry.canvas.edges.PolygonVertex[];
 
@@ -114,11 +105,11 @@ declare global {
      * @param vertex      - The target vertex
      * @param activeEdges - The set of active edges
      * @returns Is the target vertex behind some closer edge?
-     * @privateRemarks Foundry marked `@private`
+     * @internal
      */
     protected _isVertexBehindActiveEdges(
       vertex: foundry.canvas.edges.PolygonVertex,
-      activeEdges: Set<Edge>,
+      activeEdges: EdgeSet,
     ): { isBehind: boolean; wasLimited: boolean };
 
     /**
@@ -126,13 +117,12 @@ declare global {
      * @param vertex        - The target vertex
      * @param activeEdges   - The set of active edges
      * @param hasCollinear  - Are there collinear vertices behind the target vertex?
-     *                        default: `false`
-     * @privateRemarks Foundry marked `@private`
+     * @internal
      */
     protected _determineSweepResult(
       vertex: foundry.canvas.edges.PolygonVertex,
-      activeEdges: Set<Edge>,
-      hasCollinear?: boolean,
+      activeEdges: EdgeSet,
+      hasCollinear: boolean,
     ): void;
 
     /**
@@ -144,43 +134,24 @@ declare global {
      *
      * If neither side is blocked and the ray internally collides with a non-limited edge, n skip without adding polygon
      * endpoints. Sight is unaffected before this edge, and the internal collision can be ignored.
+     * @internal
      *
      * @param result      - The pending collision result
      * @param activeEdges - The set of currently active edges
-     * @privateRemarks Foundry marked `@private`
      */
-    protected _switchEdge(result: foundry.canvas.edges.CollisionResult, activeEdges: Set<Edge>): void;
+    _switchEdge(result: foundry.canvas.edges.CollisionResult, activeEdges: EdgeSet): void;
 
     protected override _testCollision<Mode extends PointSourcePolygon.CollisionModes>(
       ray: Ray,
       mode: Mode,
     ): PointSourcePolygon.TestCollision<Mode>;
 
-    override visualize(): PIXI.Graphics;
+    override visualize(): PIXI.Graphics | undefined;
 
     /**
      * Visualize the polygon, displaying its computed area, rays, and collision points
-     * @privateRemarks Foundry marked `@private`
+     * @internal
      */
     protected _visualizeCollision(ray: Ray, collisions: foundry.canvas.edges.PolygonVertex[]): void;
   }
-
-  namespace ClockwiseSweepPolygon {
-    interface Any extends AnyClockwiseSweepPolygon {}
-    type AnyConstructor = typeof AnyClockwiseSweepPolygon;
-
-    interface StoredConfig extends PointSourcePolygon.StoredConfig {
-      /** The computed bounding box for the polygon */
-      boundingBox: PIXI.Rectangle;
-    }
-    /**
-     * @privateRemarks Foundry types this as `Record<Edge.EdgeTypes, 0 | 1 | 2>`, but some keys are mutually exclusive,
-     * and none are ever set to `0`, they're simply omitted and then tested for truthiness in `#_testEdgeInclusion`
-     */
-    type DetermineEdgesReturn = IntentionalPartial<Record<Edge.EdgeTypes, 1 | 2>>;
-  }
-}
-
-declare abstract class AnyClockwiseSweepPolygon extends ClockwiseSweepPolygon {
-  constructor(arg0: never, ...args: never[]);
 }
diff --git a/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-occludable-object.d.mts b/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-occludable-object.d.mts
index e44c801e8..c7450911e 100644
--- a/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-occludable-object.d.mts
+++ b/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-occludable-object.d.mts
@@ -146,15 +146,14 @@ declare class PrimaryOccludableObject {
 }
 
 declare global {
-  function PrimaryOccludableObjectMixin<BaseClass extends PrimaryOccludableObjectMixin.BaseClass>(
+  function PrimaryOccludableObjectMixin<BaseClass extends PIXI.Container.AnyConstructor>(
     DisplayObject: BaseClass,
   ): Mixin<typeof PrimaryOccludableObject, ReturnType<typeof PrimaryCanvasObjectMixin<BaseClass>>>;
 
   namespace PrimaryOccludableObjectMixin {
-    type AnyMixedConstructor = ReturnType<typeof PrimaryOccludableObjectMixin<BaseClass>>;
-    interface AnyMixed extends AnyMixedConstructor {}
+    type AnyMixed = ReturnType<typeof PrimaryOccludableObjectMixin<PIXI.Container.AnyConstructor>>;
 
-    type BaseClass = PIXI.Container.AnyConstructor;
+    type MixinClass = typeof PrimaryOccludableObject;
 
     /** @internal */
     type _TestOcclusionOptions = NullishProps<{
diff --git a/src/foundry/client/pixi/webgl/shaders/base-shader-mixin.d.mts b/src/foundry/client/pixi/webgl/shaders/base-shader-mixin.d.mts
index 334b8ddd6..101dc3616 100644
--- a/src/foundry/client/pixi/webgl/shaders/base-shader-mixin.d.mts
+++ b/src/foundry/client/pixi/webgl/shaders/base-shader-mixin.d.mts
@@ -105,15 +105,16 @@ declare class BaseShader {
 }
 
 declare global {
-  function BaseShaderMixin<BaseClass extends BaseShaderMixin.BaseClass>(
+  function BaseShaderMixin<BaseClass extends PIXI.Shader.AnyConstructor | PIXI.Filter.AnyConstructor>(
     ShaderClass: BaseClass,
   ): Mixin<typeof BaseShader, BaseClass>;
 
-  namespace BaseShaderMixin {
-    /** @privateRemarks Can't extend `AnyMixedConstructor` if it's using the `BaseClass` union; `PIXI.Shader` is the parent of `Filter`, so it's used instead */
-    type AnyMixedConstructor = ReturnType<typeof BaseShaderMixin<PIXI.Shader.AnyConstructor>>;
-    interface AnyMixed extends AnyMixedConstructor {}
-
-    type BaseClass = PIXI.Shader.AnyConstructor | PIXI.Filter.AnyConstructor;
+  namespace BaseShader {
+    type AnyMixed = ReturnType<typeof BaseShaderMixin<PIXI.Shader.AnyConstructor | PIXI.Filter.AnyConstructor>>;
+    type AnyConstructor = typeof AnyBaseShader;
   }
 }
+
+declare abstract class AnyBaseShader extends BaseShader {
+  constructor(arg0: never, ...args: never[]);
+}
diff --git a/src/foundry/client/pixi/webgl/shaders/fragment-channel-mixin.d.mts b/src/foundry/client/pixi/webgl/shaders/fragment-channel-mixin.d.mts
index df83c37ea..76c695f99 100644
--- a/src/foundry/client/pixi/webgl/shaders/fragment-channel-mixin.d.mts
+++ b/src/foundry/client/pixi/webgl/shaders/fragment-channel-mixin.d.mts
@@ -9,7 +9,7 @@ declare class AdaptiveFragmentChannel {
    * A subclass of AdaptiveFragmentChannelMixin must implement the fragmentShader static field.
    * @defaultValue `null`
    */
-  static adaptiveFragmentShader: ((channel: AdaptiveFragmentChannelMixin.Channel) => string) | null;
+  static adaptiveFragmentShader: ((channel: AdaptiveFragmentChannel.Channel) => string) | null;
 
   /**
    * A factory method for creating the filter using its defined default values
@@ -28,7 +28,7 @@ declare class AdaptiveFragmentChannel {
     ...uniforms
   }?: ShapeWithIndexSignature<
     T,
-    AdaptiveFragmentChannelMixin.ConcreteCreateOptions,
+    AdaptiveFragmentChannel.ConcreteCreateOptions,
     string,
     AbstractBaseShader.UniformValue
   >): PIXI.Shader | PIXI.Filter;
@@ -40,21 +40,23 @@ declare global {
    * @param ShaderClass - The parent ShaderClass class being mixed.
    * @returns A Shader/Filter subclass mixed with AdaptiveFragmentChannelMixin.
    */
-  function AdaptiveFragmentChannelMixin<BaseClass extends AdaptiveFragmentChannelMixin.BaseClass>(
+  function AdaptiveFragmentChannelMixin<BaseClass extends PIXI.Shader.AnyConstructor | PIXI.Filter.AnyConstructor>(
     ShaderClass: BaseClass,
   ): Mixin<typeof AdaptiveFragmentChannel, BaseClass>;
 
-  namespace AdaptiveFragmentChannelMixin {
-    /** @privateRemarks Can't extend `AnyMixedConstructor` if it's using the `BaseClass` union; `PIXI.Shader` is the parent of `Filter`, so it's used instead */
-    type AnyMixedConstructor = ReturnType<typeof AdaptiveFragmentChannelMixin<PIXI.Shader.AnyConstructor>>;
-    interface AnyMixed extends AnyMixedConstructor {}
-
-    type BaseClass = PIXI.Shader.AnyConstructor | PIXI.Filter.AnyConstructor;
+  namespace AdaptiveFragmentChannel {
+    // Filter extends Shader, so Shader is the broadest option
+    type AnyMixed = ReturnType<typeof AdaptiveFragmentChannelMixin<PIXI.Shader.AnyConstructor>>;
+    type AnyConstructor = typeof AnyAdaptiveFragmentChannel;
 
     type Channel = "r" | "g" | "b";
 
     interface ConcreteCreateOptions {
-      channel?: AdaptiveFragmentChannelMixin.Channel | undefined;
+      channel?: AdaptiveFragmentChannel.Channel | undefined;
     }
   }
 }
+
+declare abstract class AnyAdaptiveFragmentChannel extends AdaptiveFragmentChannel {
+  constructor(arg0: never, ...args: never[]);
+}
diff --git a/src/foundry/common/prosemirror/_module.d.mts b/src/foundry/common/prosemirror/_module.d.mts
index 75c16da98..828814606 100644
--- a/src/foundry/common/prosemirror/_module.d.mts
+++ b/src/foundry/common/prosemirror/_module.d.mts
@@ -2,27 +2,28 @@ import { EditorState, AllSelection, TextSelection, Plugin, PluginKey } from "pro
 import { EditorView } from "prosemirror-view";
 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 "./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
+/* eslint-disable 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";
+
+// and these are classes that are available as properties of ProseMirror
+import ProseMirrorPlugin from "./plugin.mjs";
+import ProseMirrorImagePlugin from "./image-plugin.mjs";
+import ProseMirrorDirtyPlugin from "./dirty-plugin.mjs";
+import ProseMirrorContentLinkPlugin from "./content-link-plugin.mjs";
+import ProseMirrorHighlightMatchesPlugin from "./highlight-matches-plugin.mjs";
+import ProseMirrorClickHandler from "./click-handler.mjs";
+import DOMParser from "./dom-parser.mjs";
+import ProseMirrorInputRules from "./input-rules.mjs";
+import ProseMirrorKeyMaps from "./keymaps.mjs";
+import ProseMirrorMenu from "./menu.mjs";
+import { Step } from "prosemirror-transform";
+/* eslint-enable */
 
 declare const dom: {
   parser: DOMParser;
diff --git a/src/foundry/common/prosemirror/schema/lists.d.mts b/src/foundry/common/prosemirror/schema/lists.d.mts
index 9b46b969d..bc3f635e4 100644
--- a/src/foundry/common/prosemirror/schema/lists.d.mts
+++ b/src/foundry/common/prosemirror/schema/lists.d.mts
@@ -1,3 +1,5 @@
+import { Node } from "prosemirror-model";
+
 export declare const ol: {
   content: string;
   managed: Record<string, unknown>;
diff --git a/src/utils/index.d.mts b/src/utils/index.d.mts
index 4a2fbdf81..19b918a38 100644
--- a/src/utils/index.d.mts
+++ b/src/utils/index.d.mts
@@ -817,6 +817,7 @@ export type MutableArray<T> = Array<T>;
  * Use this instead of:
  * - `Function` - This refers to the fundamental `Function` object in JS. It allows classes.
  * - `(...args: any[]) => any` - If someone explicitly accesses the parameters or uses the return value you get `any` which is not safe.
+ * - `(...args: any[]) => any` - If someone explicitly accesses the parameters or uses the return value you get `any` which is not safe.
  * - `(...args: unknown[]) => unknown` - This allows obviously unsound calls like `fn(1, "foo")` because it indicates it can take any arguments.
  */
 // The explicit arg0 does not prevent a function with no arguments from being assigned to `AnyFunction` because any function that takes less arguments can be assigned to one that takes more.


Test patch:
diff --git a/tests/foundry/client-esm/canvas/edges/collision.test-d.ts b/tests/foundry/client-esm/canvas/edges/collision.test-d.ts
index ab3e03073..65da3d6ed 100644
--- a/tests/foundry/client-esm/canvas/edges/collision.test-d.ts
+++ b/tests/foundry/client-esm/canvas/edges/collision.test-d.ts
@@ -4,7 +4,7 @@ const myCollisionResult = new foundry.canvas.edges.CollisionResult();
 
 expectTypeOf(myCollisionResult.target).toEqualTypeOf<foundry.canvas.edges.PolygonVertex | null>();
 expectTypeOf(myCollisionResult.collisions).toEqualTypeOf<foundry.canvas.edges.PolygonVertex[]>();
-expectTypeOf(myCollisionResult.cwEdges).toEqualTypeOf<Set<foundry.canvas.edges.Edge>>();
+expectTypeOf(myCollisionResult.cwEdges).toEqualTypeOf<EdgeSet>();
 expectTypeOf(myCollisionResult.isBehind).toEqualTypeOf<boolean | undefined>();
 expectTypeOf(myCollisionResult.isLimited).toEqualTypeOf<boolean | undefined>();
 expectTypeOf(myCollisionResult.wasLimited).toEqualTypeOf<boolean | undefined>();
diff --git a/tests/foundry/client-esm/canvas/edges/vertex.test-d.ts b/tests/foundry/client-esm/canvas/edges/vertex.test-d.ts
index 9f7f81961..f2e66b30e 100644
--- a/tests/foundry/client-esm/canvas/edges/vertex.test-d.ts
+++ b/tests/foundry/client-esm/canvas/edges/vertex.test-d.ts
@@ -5,9 +5,9 @@ const vertex = new foundry.canvas.edges.PolygonVertex(2, 2);
 expectTypeOf(vertex.x).toEqualTypeOf<number>();
 expectTypeOf(vertex.y).toEqualTypeOf<number>();
 expectTypeOf(vertex.key).toEqualTypeOf<number>();
-expectTypeOf(vertex.edges).toEqualTypeOf<Set<foundry.canvas.edges.Edge>>();
-expectTypeOf(vertex.cwEdges).toEqualTypeOf<Set<foundry.canvas.edges.Edge>>();
-expectTypeOf(vertex.ccwEdges).toEqualTypeOf<Set<foundry.canvas.edges.Edge>>();
+expectTypeOf(vertex.edges).toEqualTypeOf<EdgeSet>();
+expectTypeOf(vertex.cwEdges).toEqualTypeOf<EdgeSet>();
+expectTypeOf(vertex.ccwEdges).toEqualTypeOf<EdgeSet>();
 expectTypeOf(vertex.collinearVertices).toEqualTypeOf<Set<foundry.canvas.edges.PolygonVertex>>();
 expectTypeOf(vertex.type).toEqualTypeOf<number | null>();
 expectTypeOf(vertex.isEndpoint).toEqualTypeOf<boolean | undefined>();
diff --git a/tests/foundry/client/pixi/core/shapes/limited-angle-polygon.test-d.ts b/tests/foundry/client/pixi/core/shapes/limited-angle-polygon.test-d.ts
index 042d6fe54..1d3d9cb56 100644
--- a/tests/foundry/client/pixi/core/shapes/limited-angle-polygon.test-d.ts
+++ b/tests/foundry/client/pixi/core/shapes/limited-angle-polygon.test-d.ts
@@ -1,17 +1,9 @@
 import { expectTypeOf } from "vitest";
 
 const myPoint = new PIXI.Point(2, 2);
-declare const someRay: Ray;
-
-expectTypeOf(LimitedAnglePolygon.pointBetweenRays(myPoint, someRay, someRay, 30)).toEqualTypeOf<boolean>();
 
 const myLimitedAnglePolygon = new LimitedAnglePolygon(myPoint, {
   radius: 1,
-  angle: 90,
-  rotation: 45,
-  density: 2,
-  externalRadius: 180,
 });
 
 expectTypeOf(myLimitedAnglePolygon.getBounds()).toEqualTypeOf<PIXI.Rectangle>();
-expectTypeOf(myLimitedAnglePolygon._includeEdge({ x: 50, y: 50 }, { x: 100, y: 100 })).toEqualTypeOf<boolean>();
diff --git a/tests/foundry/client/pixi/core/shapes/polygon-mesher.test-d.ts b/tests/foundry/client/pixi/core/shapes/polygon-mesher.test-d.ts
index 837e12ad1..727fa8bba 100644
--- a/tests/foundry/client/pixi/core/shapes/polygon-mesher.test-d.ts
+++ b/tests/foundry/client/pixi/core/shapes/polygon-mesher.test-d.ts
@@ -1,20 +1,7 @@
 import { expectTypeOf } from "vitest";
 
-declare const somePoly: PIXI.Polygon;
-declare const someGometry: PIXI.Geometry;
+const myPolygonMesher = new PolygonMesher([1, 2]);
 
-expectTypeOf(PolygonMesher.getClipperPathFromPoints(somePoly, 3)).toEqualTypeOf<ClipperLib.Path>();
+const myGeometry = new PIXI.Geometry();
 
-const myPolygonMesher = new PolygonMesher([1, 2, 3, 4], {
-  depthInner: null,
-  depthOuter: 7,
-  interleaved: true,
-  miterLimit: undefined,
-  normalize: null,
-  offset: 50,
-  radius: 200,
-  x: 202,
-  y: 303,
-});
-
-expectTypeOf(myPolygonMesher.triangulate(someGometry)).toEqualTypeOf<PIXI.Geometry>();
+expectTypeOf(myPolygonMesher.triangulate(myGeometry)).toEqualTypeOf<PIXI.Geometry>();
diff --git a/tests/foundry/client/pixi/core/shapes/precise-text.test-d.ts b/tests/foundry/client/pixi/core/shapes/precise-text.test-d.ts
index 996e4fea9..562d800c2 100644
--- a/tests/foundry/client/pixi/core/shapes/precise-text.test-d.ts
+++ b/tests/foundry/client/pixi/core/shapes/precise-text.test-d.ts
@@ -1,17 +1,5 @@
 import { expectTypeOf } from "vitest";
 
-let textStyle;
-expectTypeOf(
-  (textStyle = PreciseText.getTextStyle({
-    anchor: CONST.TEXT_ANCHOR_POINTS.LEFT,
-    fillGradientStops: [4, 5, 6, 1, 23, 4],
-    padding: 5,
-    wordWrap: true,
-    fontVariant: "small-caps",
-  })),
-);
-const myPreciseText = new PreciseText("foobar", textStyle);
+const myPreciseText = new PreciseText("foobar", PreciseText.getTextStyle());
 
 expectTypeOf(myPreciseText.anchor.set(0, 1)).toEqualTypeOf<PIXI.ObservablePoint>();
-expectTypeOf(myPreciseText._autoResolution).toEqualTypeOf<boolean>();
-expectTypeOf(myPreciseText._resolution).toEqualTypeOf<number>();
diff --git a/tests/foundry/client/pixi/core/shapes/ray.test-d.ts b/tests/foundry/client/pixi/core/shapes/ray.test-d.ts
index 751c411a2..81a702f89 100644
--- a/tests/foundry/client/pixi/core/shapes/ray.test-d.ts
+++ b/tests/foundry/client/pixi/core/shapes/ray.test-d.ts
@@ -1,11 +1,5 @@
 import { expectTypeOf } from "vitest";
-import type { LineIntersection } from "../../../../../../src/foundry/common/utils/geometry.d.mts";
 
-let myRay = Ray.towardsPoint({ x: 0, y: 0 }, { x: 1, y: 1 }, 5);
-myRay = Ray.fromAngle(50, 50, Math.PI / 2, 200);
-myRay = Ray.fromArrays([50, 50], [100, 100]);
+const myRay = Ray.towardsPoint({ x: 0, y: 0 }, { x: 1, y: 1 }, 5);
 
-expectTypeOf(myRay.project(7)).toEqualTypeOf<PIXI.IPointData>();
-expectTypeOf(myRay.reverse()).toEqualTypeOf<Ray>();
-expectTypeOf(myRay.shiftAngle(20, 2000)).toEqualTypeOf<Ray>();
-expectTypeOf(myRay.intersectSegment([30, 40, 90, 100])).toEqualTypeOf<LineIntersection | null>();
+expectTypeOf(myRay.project(7)).toEqualTypeOf<{ x: number; y: number }>();
diff --git a/tests/foundry/client/pixi/perception/clockwise-sweep.test-d.ts b/tests/foundry/client/pixi/perception/clockwise-sweep.test-d.ts
index 927a3989e..14b6d64aa 100644
--- a/tests/foundry/client/pixi/perception/clockwise-sweep.test-d.ts
+++ b/tests/foundry/client/pixi/perception/clockwise-sweep.test-d.ts
@@ -1,80 +1,12 @@
 import { expectTypeOf } from "vitest";
-import type PolygonVertex from "../../../../../src/foundry/client-esm/canvas/edges/vertex.d.mts";
 
 const pointA = new PIXI.Point(0, 0);
 const pointB = new PIXI.Point(0, 0);
-declare const someRect: PIXI.Rectangle;
-declare const somePoly: PIXI.Polygon;
-declare const someCircle: PIXI.Circle;
-declare const someEdge: foundry.canvas.edges.Edge;
-declare const somePV: foundry.canvas.edges.PolygonVertex;
 
-expectTypeOf(
-  ClockwiseSweepPolygon.testCollision(pointA, pointB, { mode: "any", type: "light" }),
-).toEqualTypeOf<boolean>();
-expectTypeOf(
-  ClockwiseSweepPolygon.testCollision(pointA, pointB, { mode: "closest", type: "sound" }),
-).toEqualTypeOf<PolygonVertex | null>();
-expectTypeOf(ClockwiseSweepPolygon.testCollision(pointA, pointB, { mode: "all", type: "move" })).toEqualTypeOf<
-  PolygonVertex[]
+expectTypeOf(ClockwiseSweepPolygon.testCollision(pointA, pointB, { mode: "any" })).toEqualTypeOf<boolean>();
+expectTypeOf(ClockwiseSweepPolygon.testCollision(pointA, pointB, { mode: "closest" })).toEqualTypeOf<PolygonVertex>();
+expectTypeOf(ClockwiseSweepPolygon.testCollision(pointA, pointB, { mode: "all" })).toEqualTypeOf<
+  PolygonVertex[] | null
 >();
 
-let myCSP;
-expectTypeOf(
-  (myCSP = ClockwiseSweepPolygon.create(
-    { x: 0, y: 0 },
-    {
-      type: "light",
-    },
-  )),
-).toEqualTypeOf<ClockwiseSweepPolygon>();
-
-expectTypeOf(
-  myCSP.applyConstraint(somePoly, {
-    clipType: ClipperLib.ClipType.ctXor,
-    scalingFactor: 4,
-  }),
-).toEqualTypeOf<typeof myCSP>();
-
-expectTypeOf(
-  myCSP.applyConstraint(someRect, {
-    weilerAtherton: false,
-    clipType: ClipperLib.ClipType.ctDifference,
-    scalingFactor: 2,
-  }),
-).toEqualTypeOf<typeof myCSP>();
-expectTypeOf(
-  myCSP.applyConstraint(someRect, {
-    weilerAtherton: true,
-    canMutate: false,
-    clipType: WeilerAthertonClipper.CLIP_TYPES.INTERSECT,
-  }),
-).toEqualTypeOf<typeof myCSP>();
-
-expectTypeOf(
-  myCSP.applyConstraint(someCircle, {
-    weilerAtherton: false,
-    clipType: ClipperLib.ClipType.ctUnion,
-    scalingFactor: 2,
-  }),
-).toEqualTypeOf<typeof myCSP>();
-expectTypeOf(
-  myCSP.applyConstraint(someCircle, {
-    weilerAtherton: true,
-    clipType: ClipperLib.ClipType.ctIntersection,
-    canMutate: null,
-  }),
-).toEqualTypeOf<typeof myCSP>();
-
-expectTypeOf(myCSP.contains(50, 100)).toEqualTypeOf<boolean>();
-expectTypeOf(myCSP["_testEdgeInclusion"](someEdge, { wall: 1, innerBounds: 2 }, someRect)).toEqualTypeOf<boolean>();
-
-const edgeMap = new Map([["bob", someEdge]]);
-const edgeSet = new Set([someEdge]);
-
-expectTypeOf(myCSP["_identifyIntersections"](edgeMap)).toEqualTypeOf<void>();
-expectTypeOf(myCSP["_isVertexBehindActiveEdges"](somePV, edgeSet)).toEqualTypeOf<{
-  isBehind: boolean;
-  wasLimited: boolean;
-}>();
-expectTypeOf(myCSP["_determineSweepResult"](somePV, edgeSet, false)).toEqualTypeOf<void>();
+expectTypeOf(ClockwiseSweepPolygon.create({ x: 0, y: 0 })).toEqualTypeOf<ClockwiseSweepPolygon>();
diff --git a/tests/foundry/client/pixi/webgl/shaders/fragment-channel-mixin.test-d.ts b/tests/foundry/client/pixi/webgl/shaders/fragment-channel-mixin.test-d.ts
index 6f4c55034..22b61d8a1 100644
--- a/tests/foundry/client/pixi/webgl/shaders/fragment-channel-mixin.test-d.ts
+++ b/tests/foundry/client/pixi/webgl/shaders/fragment-channel-mixin.test-d.ts
@@ -8,7 +8,7 @@ expectTypeOf(MyFragmentChannelShader.create({ channel: "r", foo: 0.5, bar: [1, 0
 >();
 if (MyFragmentChannelShader.adaptiveFragmentShader) {
   expectTypeOf(MyFragmentChannelShader.adaptiveFragmentShader).toEqualTypeOf<
-    (channel: AdaptiveFragmentChannelMixin.Channel) => string
+    (channel: AdaptiveFragmentChannel.Channel) => string
   >();
 } else {
   expectTypeOf(MyFragmentChannelShader.adaptiveFragmentShader).toEqualTypeOf<null>();
diff --git a/tests/foundry/common/prosemirror/_module.test-d.ts b/tests/foundry/common/prosemirror/_module.test-d.ts
new file mode 100644
index 000000000..9639b82be
--- /dev/null
+++ b/tests/foundry/common/prosemirror/_module.test-d.ts
@@ -0,0 +1,77 @@
+import { expectTypeOf } from "vitest";
+import type { Schema, DOMParser, DOMSerializer } from "prosemirror-model";
+import type { Step } from "prosemirror-transform";
+import type { EditorView } from "prosemirror-view";
+import { keymap } from "prosemirror-keymap";
+import type ProseMirrorKeyMaps from "../../../../src/foundry/common/prosemirror/keymaps.d.mts";
+import type ProseMirrorInputRules from "../../../../src/foundry/common/prosemirror/input-rules.d.mts";
+import type ProseMirrorImagePlugin from "../../../../src/foundry/common/prosemirror/image-plugin.d.mts";
+import type ProseMirrorHighlightMatchesPlugin from "../../../../src/foundry/common/prosemirror/highlight-matches-plugin.d.mts";
+import type ProseMirrorClickHandler from "../../../../src/foundry/common/prosemirror/click-handler.d.mts";
+import type ProseMirrorContentLinkPlugin from "../../../../src/foundry/common/prosemirror/content-link-plugin.d.mts";
+import type ProseMirrorDirtyPlugin from "../../../../src/foundry/common/prosemirror/dirty-plugin.d.mts";
+import type { parseHTMLString, serializeHTMLString } from "../../../../src/foundry/common/prosemirror/util.d.mts";
+import * as collab from "prosemirror-collab";
+import * as commands from "prosemirror-commands";
+import * as input from "prosemirror-inputrules";
+import * as tables from "prosemirror-tables";
+import * as state from "prosemirror-state";
+import * as transform from "prosemirror-transform";
+import * as list from "prosemirror-schema-list";
+import type ProseMirrorMenu from "../../../../src/foundry/common/prosemirror/menu.d.mts";
+import type ProseMirrorPlugin from "../../../../src/foundry/common/prosemirror/plugin.d.mts";
+
+expectTypeOf(foundry.prosemirror).toEqualTypeOf<typeof ProseMirror>();
+
+expectTypeOf(ProseMirror.commands).toEqualTypeOf<typeof commands>();
+expectTypeOf(ProseMirror.transform).toEqualTypeOf<typeof transform>();
+expectTypeOf(ProseMirror.list).toEqualTypeOf<typeof list>();
+expectTypeOf(ProseMirror.tables).toEqualTypeOf<typeof tables>();
+expectTypeOf(ProseMirror.input).toEqualTypeOf<typeof input>();
+expectTypeOf(ProseMirror.state).toEqualTypeOf<typeof state>();
+
+expectTypeOf(ProseMirror.AllSelection).toEqualTypeOf<typeof state.AllSelection>();
+expectTypeOf(ProseMirror.TextSelection).toEqualTypeOf<typeof state.TextSelection>();
+expectTypeOf(ProseMirror.DOMParser).toEqualTypeOf<typeof DOMParser>();
+expectTypeOf(ProseMirror.DOMSerializer).toEqualTypeOf<typeof DOMSerializer>();
+expectTypeOf(ProseMirror.EditorState).toEqualTypeOf<typeof state.EditorState>();
+expectTypeOf(ProseMirror.EditorView).toEqualTypeOf<typeof EditorView>();
+expectTypeOf(ProseMirror.Schema).toEqualTypeOf<typeof Schema>();
+expectTypeOf(ProseMirror.Step).toEqualTypeOf<typeof Step>();
+expectTypeOf(ProseMirror.Plugin).toEqualTypeOf<typeof state.Plugin>();
+expectTypeOf(ProseMirror.PluginKey).toEqualTypeOf<typeof state.PluginKey>();
+expectTypeOf(ProseMirror.ProseMirrorPlugin).toEqualTypeOf<typeof ProseMirrorPlugin>();
+expectTypeOf(ProseMirror.ProseMirrorContentLinkPlugin).toEqualTypeOf<typeof ProseMirrorContentLinkPlugin>();
+expectTypeOf(ProseMirror.ProseMirrorHighlightMatchesPlugin).toEqualTypeOf<typeof ProseMirrorHighlightMatchesPlugin>();
+expectTypeOf(ProseMirror.ProseMirrorDirtyPlugin).toEqualTypeOf<typeof ProseMirrorDirtyPlugin>();
+expectTypeOf(ProseMirror.ProseMirrorImagePlugin).toEqualTypeOf<typeof ProseMirrorImagePlugin>();
+expectTypeOf(ProseMirror.ProseMirrorClickHandler).toEqualTypeOf<typeof ProseMirrorClickHandler>();
+expectTypeOf(ProseMirror.ProseMirrorInputRules).toEqualTypeOf<typeof ProseMirrorInputRules>();
+expectTypeOf(ProseMirror.ProseMirrorKeyMaps).toEqualTypeOf<typeof ProseMirrorKeyMaps>();
+expectTypeOf(ProseMirror.ProseMirrorMenu).toEqualTypeOf<typeof ProseMirrorMenu>();
+expectTypeOf(ProseMirror.collab).toEqualTypeOf<typeof collab>();
+expectTypeOf(ProseMirror.defaultPlugins).toEqualTypeOf<
+  Record<
+    | "inputRules"
+    | "keyMaps"
+    | "menu"
+    | "isDirty"
+    | "clickHandler"
+    | "pasteTransformer"
+    | "baseKeyMap"
+    | "dropCursor"
+    | "gapCursor"
+    | "history"
+    | "columnResizing"
+    | "tables",
+    state.Plugin
+  >
+>();
+expectTypeOf(ProseMirror.defaultSchema).toEqualTypeOf<Schema>();
+expectTypeOf(ProseMirror.dom).toEqualTypeOf<{
+  parser: DOMParser;
+  serializer: DOMSerializer;
+  parseString: typeof parseHTMLString;
+  serializeString: typeof serializeHTMLString;
+}>();
+expectTypeOf(ProseMirror.keymap).toEqualTypeOf<typeof keymap>();
diff --git a/tests/foundry/common/prosemirror/click-handler.test-d.ts b/tests/foundry/common/prosemirror/click-handler.test-d.ts
new file mode 100644
index 000000000..4826da0fa
--- /dev/null
+++ b/tests/foundry/common/prosemirror/click-handler.test-d.ts
@@ -0,0 +1,4 @@
+import { expectTypeOf } from "vitest";
+
+declare const schema: foundry.prosemirror.Schema;
+expectTypeOf(foundry.prosemirror.ProseMirrorClickHandler.build(schema, {})).toEqualTypeOf<foundry.prosemirror.Plugin>();
diff --git a/tests/foundry/common/prosemirror/content-link-plugin.test-d.ts b/tests/foundry/common/prosemirror/content-link-plugin.test-d.ts
new file mode 100644
index 000000000..19f8c3b19
--- /dev/null
+++ b/tests/foundry/common/prosemirror/content-link-plugin.test-d.ts
@@ -0,0 +1,11 @@
+import { expectTypeOf } from "vitest";
+
+declare const schema: foundry.prosemirror.Schema;
+
+const proseMirrorContentLinkPlugin = new foundry.prosemirror.ProseMirrorContentLinkPlugin(schema, {});
+expectTypeOf(proseMirrorContentLinkPlugin.document).toEqualTypeOf<foundry.abstract.Document.Any>();
+expectTypeOf(proseMirrorContentLinkPlugin.relativeLinks).toEqualTypeOf<Readonly<boolean>>();
+
+expectTypeOf(
+  foundry.prosemirror.ProseMirrorContentLinkPlugin.build(schema, {}),
+).toEqualTypeOf<foundry.prosemirror.Plugin>();
diff --git a/tests/foundry/common/prosemirror/dirty-plugin.test-d.ts b/tests/foundry/common/prosemirror/dirty-plugin.test-d.ts
new file mode 100644
index 000000000..9e53191ec
--- /dev/null
+++ b/tests/foundry/common/prosemirror/dirty-plugin.test-d.ts
@@ -0,0 +1,5 @@
+import { expectTypeOf } from "vitest";
+
+declare const schema: foundry.prosemirror.Schema;
+
+expectTypeOf(foundry.prosemirror.ProseMirrorDirtyPlugin.build(schema, {})).toEqualTypeOf<foundry.prosemirror.Plugin>();
diff --git a/tests/foundry/common/prosemirror/dom-parser.test-d.ts b/tests/foundry/common/prosemirror/dom-parser.test-d.ts
new file mode 100644
index 000000000..ca62a9cf4
--- /dev/null
+++ b/tests/foundry/common/prosemirror/dom-parser.test-d.ts
@@ -0,0 +1,11 @@
+import { expectTypeOf } from "vitest";
+import type { DOMParser as BaseDOMParser, Node } from "prosemirror-model";
+import type { FixedInstanceType } from "../../../../src/utils/index.d.mts";
+
+declare const schema: foundry.prosemirror.Schema;
+
+declare const domParser: foundry.prosemirror.DOMParser;
+declare const dom: FixedInstanceType<typeof window.Node>;
+expectTypeOf(domParser.parse(dom, {})).toEqualTypeOf<Node>();
+
+expectTypeOf(foundry.prosemirror.DOMParser.fromSchema(schema)).toEqualTypeOf<BaseDOMParser>();
diff --git a/tests/foundry/common/prosemirror/dropdown.test-d.ts b/tests/foundry/common/prosemirror/dropdown.test-d.ts
new file mode 100644
index 000000000..1404cfc6f
--- /dev/null
+++ b/tests/foundry/common/prosemirror/dropdown.test-d.ts
@@ -0,0 +1,11 @@
+/* eslint-disable import/extensions */
+import { expectTypeOf } from "vitest";
+import ProseMirrorDropDown from "../../../../src/foundry/common/prosemirror/dropdown.mjs";
+
+const proseMirrorDropDown = new ProseMirrorDropDown("", [], {});
+
+declare const html: HTMLMenuElement;
+
+expectTypeOf(proseMirrorDropDown.activateListeners(html)).toEqualTypeOf<void>();
+expectTypeOf(proseMirrorDropDown.render()).toEqualTypeOf<string>();
+expectTypeOf(proseMirrorDropDown.forEachItem(() => true)).toEqualTypeOf<void>();
diff --git a/tests/foundry/common/prosemirror/extensions.test-d.ts b/tests/foundry/common/prosemirror/extensions.test-d.ts
new file mode 100644
index 000000000..a4e7efa9a
--- /dev/null
+++ b/tests/foundry/common/prosemirror/extensions.test-d.ts
@@ -0,0 +1,8 @@
+/* eslint-disable import/extensions */
+import { expectTypeOf } from "vitest";
+import type { NodeType, ResolvedPos } from "prosemirror-model";
+
+declare const pos: ResolvedPos;
+
+declare const other: NodeType;
+expectTypeOf(pos.hasAncestor(other)).toEqualTypeOf<boolean>();
diff --git a/tests/foundry/common/prosemirror/highlight-matches-plugin.test-d.ts b/tests/foundry/common/prosemirror/highlight-matches-plugin.test-d.ts
new file mode 100644
index 000000000..25842ac18
--- /dev/null
+++ b/tests/foundry/common/prosemirror/highlight-matches-plugin.test-d.ts
@@ -0,0 +1,13 @@
+import { expectTypeOf } from "vitest";
+
+declare const schema: foundry.prosemirror.Schema;
+
+new foundry.prosemirror.ProseMirrorHighlightMatchesPlugin(schema, {});
+
+expectTypeOf(
+  foundry.prosemirror.ProseMirrorHighlightMatchesPlugin.build(schema, {}),
+).toEqualTypeOf<foundry.prosemirror.Plugin>();
+
+// TODO: build() should actually returns not just any plugin, but a plugin where spec.view is a function:
+//   view(e: editorView) => PossibleMatchesTooltip
+// that returns a PossibleMatchesTooltip that we can then test the properties of
diff --git a/tests/foundry/common/prosemirror/image-plugin.test-d.ts b/tests/foundry/common/prosemirror/image-plugin.test-d.ts
new file mode 100644
index 000000000..df23feb89
--- /dev/null
+++ b/tests/foundry/common/prosemirror/image-plugin.test-d.ts
@@ -0,0 +1,8 @@
+import { expectTypeOf } from "vitest";
+
+declare const schema: foundry.prosemirror.Schema;
+
+new foundry.prosemirror.ProseMirrorImagePlugin(schema, {});
+
+expectTypeOf(foundry.prosemirror.ProseMirrorImagePlugin.build(schema, {})).toEqualTypeOf<foundry.prosemirror.Plugin>();
+expectTypeOf(foundry.prosemirror.ProseMirrorImagePlugin.base64ToFile("", "", "")).toEqualTypeOf<File>();
diff --git a/tests/foundry/common/prosemirror/input-rules.test-d.ts b/tests/foundry/common/prosemirror/input-rules.test-d.ts
new file mode 100644
index 000000000..fd5dc9531
--- /dev/null
+++ b/tests/foundry/common/prosemirror/input-rules.test-d.ts
@@ -0,0 +1,10 @@
+import type { InputRule } from "prosemirror-inputrules";
+import { expectTypeOf } from "vitest";
+
+declare const schema: foundry.prosemirror.Schema;
+
+const inputRules = new foundry.prosemirror.ProseMirrorInputRules(schema);
+
+expectTypeOf(inputRules.buildRules()).toEqualTypeOf<InputRule[]>();
+
+expectTypeOf(foundry.prosemirror.ProseMirrorInputRules.build(schema, {})).toEqualTypeOf<foundry.prosemirror.Plugin>();
diff --git a/tests/foundry/common/prosemirror/keymaps.test-d.ts b/tests/foundry/common/prosemirror/keymaps.test-d.ts
new file mode 100644
index 000000000..a7c4e3ef2
--- /dev/null
+++ b/tests/foundry/common/prosemirror/keymaps.test-d.ts
@@ -0,0 +1,11 @@
+import { expectTypeOf } from "vitest";
+import type { ProseMirrorCommand } from "../../../../src/foundry/common/prosemirror/keymaps.d.mts";
+
+declare const schema: foundry.prosemirror.Schema;
+
+const keymaps = new foundry.prosemirror.ProseMirrorKeyMaps(schema, {});
+
+expectTypeOf(keymaps.onSave()).toEqualTypeOf<void>();
+expectTypeOf(keymaps.buildMapping()).toEqualTypeOf<Record<string, ProseMirrorCommand>>();
+
+expectTypeOf(foundry.prosemirror.ProseMirrorKeyMaps.build(schema, {})).toEqualTypeOf<foundry.prosemirror.Plugin>();
diff --git a/tests/foundry/common/prosemirror/menu.test-d.ts b/tests/foundry/common/prosemirror/menu.test-d.ts
new file mode 100644
index 000000000..a93e26298
--- /dev/null
+++ b/tests/foundry/common/prosemirror/menu.test-d.ts
@@ -0,0 +1,24 @@
+/* eslint-disable import/extensions */
+import { expectTypeOf } from "vitest";
+import type { EditorView } from "prosemirror-view";
+import type * as PMMNamespace from "../../../../src/foundry/common/prosemirror/menu.d.mts";
+import { Plugin } from "prosemirror-state";
+
+declare const schema: foundry.prosemirror.Schema;
+declare const view: EditorView;
+
+const proseMirrorMenu = new foundry.prosemirror.ProseMirrorMenu(schema, view);
+
+expectTypeOf(proseMirrorMenu.view).toEqualTypeOf<EditorView>();
+expectTypeOf(proseMirrorMenu.items).toEqualTypeOf<PMMNamespace.ProseMirrorMenu.Item[]>();
+expectTypeOf(proseMirrorMenu.id).toEqualTypeOf<Readonly<`prosemirror-menu-${string}`>>();
+expectTypeOf(proseMirrorMenu.options).toEqualTypeOf<PMMNamespace.ProseMirrorMenu.ProseMirrorMenuOptions>();
+expectTypeOf(proseMirrorMenu.dropdowns).toEqualTypeOf<PMMNamespace.ProseMirrorDropDown.Entry[]>();
+expectTypeOf(proseMirrorMenu.render()).toEqualTypeOf<foundry.prosemirror.ProseMirrorMenu>();
+
+declare const html: HTMLMenuElement;
+expectTypeOf(proseMirrorMenu.activateListeners(html)).toEqualTypeOf<void>();
+expectTypeOf(proseMirrorMenu.update(view, view)).toEqualTypeOf<void>();
+expectTypeOf(proseMirrorMenu.destroy()).toEqualTypeOf<void>();
+
+expectTypeOf(foundry.prosemirror.ProseMirrorMenu.build(schema)).toEqualTypeOf<Plugin>();
diff --git a/tests/foundry/common/prosemirror/paste-transformer.test-d.ts b/tests/foundry/common/prosemirror/paste-transformer.test-d.ts
new file mode 100644
index 000000000..09dd67a13
--- /dev/null
+++ b/tests/foundry/common/prosemirror/paste-transformer.test-d.ts
@@ -0,0 +1,15 @@
+/* eslint-disable import/extensions */
+import { expectTypeOf } from "vitest";
+import ProseMirrorPasteTransformer from "../../../../src/foundry/common/prosemirror/paste-transformer.mjs";
+import { Slice } from "prosemirror-model";
+import type { EditorView } from "prosemirror-view";
+
+declare const schema: foundry.prosemirror.Schema;
+
+const pasteTransformer = new ProseMirrorPasteTransformer(schema);
+
+declare const slice: Slice;
+declare const view: EditorView;
+expectTypeOf(pasteTransformer._onPaste(slice, view)).toEqualTypeOf<Slice>();
+
+expectTypeOf(ProseMirrorPasteTransformer.build(schema, {})).toEqualTypeOf<foundry.prosemirror.Plugin>();
diff --git a/tests/foundry/common/prosemirror/plugin.test-d..ts b/tests/foundry/common/prosemirror/plugin.test-d..ts
new file mode 100644
index 000000000..016b60fbe
--- /dev/null
+++ b/tests/foundry/common/prosemirror/plugin.test-d..ts
@@ -0,0 +1,12 @@
+/* eslint-disable import/extensions */
+import { expectTypeOf } from "vitest";
+import { Schema } from "prosemirror-model";
+import ProseMirrorPlugin from "../../../../src/foundry/common/prosemirror/plugin.mjs";
+
+declare const schema: foundry.prosemirror.Schema;
+
+declare const plugin: ProseMirrorPlugin;
+
+expectTypeOf(plugin.schema).toEqualTypeOf<Schema>();
+
+expectTypeOf(ProseMirrorPlugin.build(schema, {})).toEqualTypeOf<foundry.prosemirror.Plugin>();
diff --git a/tests/foundry/common/prosemirror/prosemirror.test-d.ts b/tests/foundry/common/prosemirror/prosemirror.test-d.ts
deleted file mode 100644
index 2681ddd38..000000000
--- a/tests/foundry/common/prosemirror/prosemirror.test-d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import type { Schema } from "prosemirror-model";
-import type { EditorState } from "prosemirror-state";
-import { expectTypeOf } from "vitest";
-
-expectTypeOf(ProseMirror.EditorState).toEqualTypeOf<typeof EditorState>();
-expectTypeOf(ProseMirror.Schema).toEqualTypeOf<typeof Schema>();
-expectTypeOf(ProseMirror.defaultSchema).toEqualTypeOf<Schema>();
diff --git a/tests/foundry/common/prosemirror/schema/attribute-capture.test-d.ts b/tests/foundry/common/prosemirror/schema/attribute-capture.test-d.ts
new file mode 100644
index 000000000..6c196f6ed
--- /dev/null
+++ b/tests/foundry/common/prosemirror/schema/attribute-capture.test-d.ts
@@ -0,0 +1,10 @@
+/* eslint-disable import/extensions */
+import type { DOMOutputSpec, MarkSpec, NodeSpec } from "prosemirror-model";
+import { expectTypeOf } from "vitest";
+import AttributeCapture from "../../../../../src/foundry/common/prosemirror/schema/attribute-capture.mjs";
+
+const attributeCapture = new AttributeCapture();
+declare const nodeSpec: NodeSpec;
+declare const markSpec: MarkSpec;
+expectTypeOf(attributeCapture.attributeCapture(nodeSpec)).toEqualTypeOf<DOMOutputSpec>();
+expectTypeOf(attributeCapture.attributeCapture(markSpec)).toEqualTypeOf<DOMOutputSpec>();
diff --git a/tests/foundry/common/prosemirror/schema/core.test-d.ts b/tests/foundry/common/prosemirror/schema/core.test-d.ts
new file mode 100644
index 000000000..8a400cc06
--- /dev/null
+++ b/tests/foundry/common/prosemirror/schema/core.test-d.ts
@@ -0,0 +1,61 @@
+/* eslint-disable import/extensions */
+import type { Node } from "prosemirror-model";
+import { expectTypeOf } from "vitest";
+import {
+  paragraph,
+  blockquote,
+  hr,
+  heading,
+  pre,
+  br,
+} from "../../../../../src/foundry/common/prosemirror/schema/core.mjs";
+
+expectTypeOf(paragraph).toEqualTypeOf<{
+  attrs: Record<string, unknown>;
+  managed: Record<string, unknown>;
+  content: string;
+  group: string;
+  parseDOM: Record<string, unknown>[];
+  toDOM: (node: Node) => [string, Record<string, string>, number] | [string, number];
+}>();
+
+expectTypeOf(blockquote).toEqualTypeOf<{
+  content: string;
+  group: string;
+  defining: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(hr).toEqualTypeOf<{
+  group: string;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string];
+}>();
+
+expectTypeOf(heading).toEqualTypeOf<{
+  attrs: Record<string, unknown>;
+  content: string;
+  group: string;
+  defining: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: (node: Node) => [string, number];
+}>();
+
+expectTypeOf(pre).toEqualTypeOf<{
+  content: string;
+  marks: string;
+  group: string;
+  code: boolean;
+  defining: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, [string, number]];
+}>();
+
+expectTypeOf(br).toEqualTypeOf<{
+  inline: boolean;
+  group: string;
+  selectable: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string];
+}>();
diff --git a/tests/foundry/common/prosemirror/schema/image-link-node.test-d.ts b/tests/foundry/common/prosemirror/schema/image-link-node.test-d.ts
new file mode 100644
index 000000000..b478ff096
--- /dev/null
+++ b/tests/foundry/common/prosemirror/schema/image-link-node.test-d.ts
@@ -0,0 +1,21 @@
+/* eslint-disable import/extensions */
+import { expectTypeOf } from "vitest";
+import ImageLinkNode from "../../../../../src/foundry/common/prosemirror/schema/image-link-node.mjs";
+import type { MarkSpec, Node, NodeSpec } from "prosemirror-model";
+import type { EditorView } from "prosemirror-view";
+
+new ImageLinkNode();
+
+expectTypeOf(ImageLinkNode.tag).toEqualTypeOf<"a">();
+expectTypeOf(ImageLinkNode.attrs).toEqualTypeOf<Record<string, unknown>>();
+
+declare const el: HTMLLinkElement;
+expectTypeOf(ImageLinkNode.getAttrs(el)).toEqualTypeOf<boolean | Record<string, unknown>>();
+
+declare const node: Node;
+expectTypeOf(ImageLinkNode.toDOM(node)).toEqualTypeOf<[string, unknown]>();
+expectTypeOf(ImageLinkNode.make()).toEqualTypeOf<NodeSpec | MarkSpec>();
+
+declare const view: EditorView;
+declare const event: JQuery.ClickEvent;
+expectTypeOf(ImageLinkNode.onClick(view, 3, event, node)).toEqualTypeOf<boolean>();
diff --git a/tests/foundry/common/prosemirror/schema/image-node.test-d.ts b/tests/foundry/common/prosemirror/schema/image-node.test-d.ts
new file mode 100644
index 000000000..7f67f08d4
--- /dev/null
+++ b/tests/foundry/common/prosemirror/schema/image-node.test-d.ts
@@ -0,0 +1,16 @@
+/* eslint-disable import/extensions */
+import { expectTypeOf } from "vitest";
+import ImageNode from "../../../../../src/foundry/common/prosemirror/schema/image-node.mjs";
+import type { MarkSpec, Node, NodeSpec } from "prosemirror-model";
+
+new ImageNode();
+
+expectTypeOf(ImageNode.tag).toEqualTypeOf<"img[src]">();
+expectTypeOf(ImageNode.attrs).toEqualTypeOf<Record<string, unknown>>();
+
+declare const el: HTMLImageElement;
+expectTypeOf(ImageNode.getAttrs(el)).toEqualTypeOf<boolean | Record<string, unknown>>();
+
+declare const node: Node;
+expectTypeOf(ImageNode.toDOM(node)).toEqualTypeOf<[string, unknown]>();
+expectTypeOf(ImageNode.make()).toEqualTypeOf<NodeSpec | MarkSpec>();
diff --git a/tests/foundry/common/prosemirror/schema/link-mark.test-d.ts b/tests/foundry/common/prosemirror/schema/link-mark.test-d.ts
new file mode 100644
index 000000000..b2e66672e
--- /dev/null
+++ b/tests/foundry/common/prosemirror/schema/link-mark.test-d.ts
@@ -0,0 +1,22 @@
+/* eslint-disable import/extensions */
+import { expectTypeOf } from "vitest";
+import LinkMark from "../../../../../src/foundry/common/prosemirror/schema/link-mark.mjs";
+import type { Mark, MarkSpec, Node, NodeSpec } from "prosemirror-model";
+import type { EditorView } from "prosemirror-view";
+
+new LinkMark();
+
+expectTypeOf(LinkMark.tag).toEqualTypeOf<"a">();
+expectTypeOf(LinkMark.attrs).toEqualTypeOf<Record<string, unknown>>();
+
+declare const el: HTMLLinkElement;
+expectTypeOf(LinkMark.getAttrs(el)).toEqualTypeOf<boolean | Record<string, unknown>>();
+
+declare const node: Node;
+expectTypeOf(LinkMark.toDOM(node)).toEqualTypeOf<[string, unknown]>();
+expectTypeOf(LinkMark.make()).toEqualTypeOf<NodeSpec | MarkSpec>();
+
+declare const view: EditorView;
+declare const event: JQuery.ClickEvent;
+declare const mark: Mark;
+expectTypeOf(LinkMark.onClick(view, 3, event, mark)).toEqualTypeOf<boolean | void>();
diff --git a/tests/foundry/common/prosemirror/schema/lists.test-d.ts b/tests/foundry/common/prosemirror/schema/lists.test-d.ts
new file mode 100644
index 000000000..d0e05f333
--- /dev/null
+++ b/tests/foundry/common/prosemirror/schema/lists.test-d.ts
@@ -0,0 +1,34 @@
+/* eslint-disable import/extensions */
+import type { Node } from "prosemirror-model";
+import { expectTypeOf } from "vitest";
+import { ol, ul, li, liText } from "../../../../../src/foundry/common/prosemirror/schema/lists.mjs";
+
+expectTypeOf(ol).toEqualTypeOf<{
+  content: string;
+  managed: Record<string, unknown>;
+  group: string;
+  attrs: Record<string, unknown>;
+  parseDOM: Record<string, unknown>[];
+  toDOM: (node: Node) => [string, number] | [string, Record<string, unknown>, number];
+}>();
+
+expectTypeOf(ul).toEqualTypeOf<{
+  content: string;
+  group: string;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(li).toEqualTypeOf<{
+  content: string;
+  defining: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(liText).toEqualTypeOf<{
+  content: string;
+  defining: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
diff --git a/tests/foundry/common/prosemirror/schema/other.test-d.ts b/tests/foundry/common/prosemirror/schema/other.test-d.ts
new file mode 100644
index 000000000..6b4184ff7
--- /dev/null
+++ b/tests/foundry/common/prosemirror/schema/other.test-d.ts
@@ -0,0 +1,175 @@
+/* eslint-disable import/extensions */
+import { expectTypeOf } from "vitest";
+import {
+  details,
+  summary,
+  summaryBlock,
+  dl,
+  dt,
+  dd,
+  fieldset,
+  legend,
+  picture,
+  audio,
+  video,
+  track,
+  source,
+  object,
+  figure,
+  figcaption,
+  small,
+  ruby,
+  rp,
+  rt,
+  iframe,
+} from "../../../../../src/foundry/common/prosemirror/schema/other.mjs";
+
+expectTypeOf(details).toEqualTypeOf<{
+  content: string;
+  group: string;
+  defining: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(summary).toEqualTypeOf<{
+  content: string;
+  defining: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(summaryBlock).toEqualTypeOf<{
+  content: string;
+  defining: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(dl).toEqualTypeOf<{
+  content: string;
+  group: string;
+  defining: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(dt).toEqualTypeOf<{
+  content: string;
+  defining: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(dd).toEqualTypeOf<{
+  content: string;
+  defining: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(fieldset).toEqualTypeOf<{
+  content: string;
+  group: string;
+  defining: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(legend).toEqualTypeOf<{
+  content: string;
+  defining: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(picture).toEqualTypeOf<{
+  content: string;
+  group: string;
+  defining: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(audio).toEqualTypeOf<{
+  content: string;
+  group: string;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(video).toEqualTypeOf<{
+  content: string;
+  group: string;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(track).toEqualTypeOf<{
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string];
+}>();
+
+expectTypeOf(source).toEqualTypeOf<{
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string];
+}>();
+
+expectTypeOf(object).toEqualTypeOf<{
+  inline: boolean;
+  group: string;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string];
+}>();
+
+expectTypeOf(figure).toEqualTypeOf<{
+  content: string;
+  group: string;
+  defining: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(figcaption).toEqualTypeOf<{
+  content: string;
+  defining: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(small).toEqualTypeOf<{
+  content: string;
+  group: string;
+  defining: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(ruby).toEqualTypeOf<{
+  content: string;
+  group: string;
+  defining: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(rp).toEqualTypeOf<{
+  content: string;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(rt).toEqualTypeOf<{
+  content: string;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(iframe).toEqualTypeOf<{
+  attrs: Record<string, unknown>;
+  managed: Record<string, unknown>;
+  group: string;
+  defining: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, unknown];
+}>();
diff --git a/tests/foundry/common/prosemirror/schema/schema-definition.test-d.ts b/tests/foundry/common/prosemirror/schema/schema-definition.test-d.ts
new file mode 100644
index 000000000..9903e1bf3
--- /dev/null
+++ b/tests/foundry/common/prosemirror/schema/schema-definition.test-d.ts
@@ -0,0 +1,14 @@
+/* eslint-disable import/extensions */
+import { expectTypeOf } from "vitest";
+import SchemaDefinition from "../../../../../src/foundry/common/prosemirror/schema/schema-definition.mjs";
+import type { MarkSpec, Node, NodeSpec } from "prosemirror-model";
+
+expectTypeOf(SchemaDefinition.tag).toEqualTypeOf<string>();
+expectTypeOf(SchemaDefinition.attrs).toEqualTypeOf<Record<string, unknown>>();
+
+declare const el: HTMLElement;
+expectTypeOf(SchemaDefinition.getAttrs(el)).toEqualTypeOf<Record<string, unknown> | boolean>();
+
+declare const node: Node;
+expectTypeOf(SchemaDefinition.toDOM(node)).toEqualTypeOf<unknown[]>();
+expectTypeOf(SchemaDefinition.make()).toEqualTypeOf<NodeSpec | MarkSpec>();
diff --git a/tests/foundry/common/prosemirror/schema/secret-node.test-d.ts b/tests/foundry/common/prosemirror/schema/secret-node.test-d.ts
new file mode 100644
index 000000000..c24478030
--- /dev/null
+++ b/tests/foundry/common/prosemirror/schema/secret-node.test-d.ts
@@ -0,0 +1,20 @@
+/* eslint-disable import/extensions */
+import { expectTypeOf } from "vitest";
+import SecretNode from "../../../../../src/foundry/common/prosemirror/schema/secret-node.mjs";
+import type { MarkSpec, Node, NodeSpec } from "prosemirror-model";
+import type { EditorState } from "../../../../../src/foundry/common/prosemirror/_module.d.mts";
+import type { Transaction } from "prosemirror-state";
+
+expectTypeOf(SecretNode.tag).toEqualTypeOf<"section">();
+expectTypeOf(SecretNode.attrs).toEqualTypeOf<Record<string, unknown>>();
+
+declare const el: HTMLElement;
+expectTypeOf(SecretNode.getAttrs(el)).toEqualTypeOf<Record<string, unknown> | boolean>();
+
+declare const node: Node;
+expectTypeOf(SecretNode.toDOM(node)).toEqualTypeOf<[string, Record<string, unknown>, number]>();
+expectTypeOf(SecretNode.make()).toEqualTypeOf<NodeSpec | MarkSpec>();
+
+declare const state: EditorState;
+declare const dispatch: (tr: Transaction) => void;
+expectTypeOf(SecretNode.split(state, dispatch)).toEqualTypeOf<boolean>();
diff --git a/tests/foundry/common/prosemirror/schema/tables.test-d.ts b/tests/foundry/common/prosemirror/schema/tables.test-d.ts
new file mode 100644
index 000000000..6d447ce86
--- /dev/null
+++ b/tests/foundry/common/prosemirror/schema/tables.test-d.ts
@@ -0,0 +1,124 @@
+/* eslint-disable import/extensions */
+import type { Node } from "prosemirror-model";
+import { expectTypeOf } from "vitest";
+import {
+  builtInTableNodes,
+  tableComplex,
+  colgroup,
+  col,
+  thead,
+  tbody,
+  tfoot,
+  caption,
+  captionBlock,
+  tableRowComplex,
+  tableCellComplex,
+  tableCellComplexBlock,
+  tableHeaderComplex,
+  tableHeaderComplexBlock,
+} from "../../../../../src/foundry/common/prosemirror/schema/tables.mjs";
+
+expectTypeOf(builtInTableNodes).toEqualTypeOf<{
+  table: Record<string, unknown>;
+  table_cell: Record<string, unknown>;
+  table_header: Record<string, unknown>;
+  table_row: Record<string, unknown>;
+}>();
+
+expectTypeOf(tableComplex).toEqualTypeOf<{
+  content: string;
+  isolating: boolean;
+  group: string;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(colgroup).toEqualTypeOf<{
+  content: string;
+  isolating: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(col).toEqualTypeOf<{
+  tableRole: string;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string];
+}>();
+
+expectTypeOf(thead).toEqualTypeOf<{
+  content: string;
+  isolating: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(tbody).toEqualTypeOf<{
+  content: string;
+  isolating: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(tfoot).toEqualTypeOf<{
+  content: string;
+  isolating: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(caption).toEqualTypeOf<{
+  content: string;
+  isolating: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(captionBlock).toEqualTypeOf<{
+  content: string;
+  isolating: boolean;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(tableRowComplex).toEqualTypeOf<{
+  content: string;
+  parseDOM: Record<string, unknown>[];
+  toDOM: () => [string, number];
+}>();
+
+expectTypeOf(tableCellComplex).toEqualTypeOf<{
+  content: string;
+  attrs: Record<string, unknown>;
+  managed: Record<string, string[]>;
+  isolating: boolean;
+  parseDOM: Record<string, unknown>;
+  toDOM: (node: Node) => [string, unknown, number];
+}>();
+
+expectTypeOf(tableCellComplexBlock).toEqualTypeOf<{
+  content: string;
+  attrs: Record<string, unknown>;
+  managed: Record<string, string[]>;
+  isolating: boolean;
+  parseDOM: Record<string, unknown>;
+  toDOM: (node: Node) => [string, unknown, number];
+}>();
+
+expectTypeOf(tableHeaderComplex).toEqualTypeOf<{
+  content: string;
+  attrs: Record<string, unknown>;
+  managed: Record<string, string[]>;
+  isolating: boolean;
+  parseDOM: Record<string, unknown>;
+  toDOM: (node: Node) => [string, unknown, number];
+}>();
+
+expectTypeOf(tableHeaderComplexBlock).toEqualTypeOf<{
+  content: string;
+  attrs: Record<string, unknown>;
+  managed: Record<string, string[]>;
+  isolating: boolean;
+  parseDOM: Record<string, unknown>;
+  toDOM: (node: Node) => [string, unknown, number];
+}>();
diff --git a/tests/foundry/common/prosemirror/schema/utils.test-d.ts b/tests/foundry/common/prosemirror/schema/utils.test-d.ts
new file mode 100644
index 000000000..3a856ea4d
--- /dev/null
+++ b/tests/foundry/common/prosemirror/schema/utils.test-d.ts
@@ -0,0 +1,18 @@
+/* eslint-disable import/extensions */
+import { expectTypeOf } from "vitest";
+import {
+  onlyInlineContent,
+  isElementEmpty,
+  stylesFromString,
+  mergeStyle,
+  classesFromString,
+  mergeClass,
+} from "../../../../../src/foundry/common/prosemirror/schema/utils.mjs";
+
+declare const el: HTMLElement;
+expectTypeOf(onlyInlineContent(el)).toEqualTypeOf<boolean>();
+expectTypeOf(isElementEmpty(el)).toEqualTypeOf<boolean>();
+expectTypeOf(stylesFromString("")).toEqualTypeOf<Record<string, unknown>>();
+expectTypeOf(mergeStyle("", "")).toEqualTypeOf<string>();
+expectTypeOf(classesFromString("")).toEqualTypeOf<string[]>();
+expectTypeOf(mergeClass("", "")).toEqualTypeOf<string>();
diff --git a/tests/foundry/common/prosemirror/string-serializer.test-d.ts b/tests/foundry/common/prosemirror/string-serializer.test-d.ts
new file mode 100644
index 000000000..2f5ad5847
--- /dev/null
+++ b/tests/foundry/common/prosemirror/string-serializer.test-d.ts
@@ -0,0 +1,27 @@
+/* eslint-disable import/extensions */
+import { expectTypeOf } from "vitest";
+import StringSerializer, { StringNode } from "../../../../src/foundry/common/prosemirror/string-serializer.mjs";
+import type {
+  ProseMirrorMarkOutput,
+  ProseMirrorNodeOutput,
+} from "../../../../src/foundry/common/prosemirror/string-serializer.mjs";
+import type { Fragment } from "prosemirror-model";
+
+declare const schema: foundry.prosemirror.Schema;
+
+declare const nodes: Record<string, ProseMirrorNodeOutput>;
+declare const marks: Record<string, ProseMirrorMarkOutput>;
+
+const stringSerializer = new StringSerializer(nodes, marks);
+
+declare const fragment: Fragment;
+expectTypeOf(stringSerializer.serializeFragment(fragment)).toEqualTypeOf<StringNode>();
+
+expectTypeOf(StringSerializer.fromSchema(schema)).toEqualTypeOf<StringSerializer>();
+
+const stringNode = new StringNode();
+expectTypeOf(stringNode.tag).toEqualTypeOf<Readonly<string | undefined>>();
+expectTypeOf(stringNode.attrs).toEqualTypeOf<Record<string, string> | undefined>();
+expectTypeOf(stringNode.inline).toEqualTypeOf<boolean>();
+expectTypeOf(stringNode.appendChild(stringNode)).toEqualTypeOf<void>();
+expectTypeOf(stringNode.toString()).toEqualTypeOf<string>();
diff --git a/tests/foundry/common/prosemirror/util.test-d.ts b/tests/foundry/common/prosemirror/util.test-d.ts
new file mode 100644
index 000000000..476a1bce9
--- /dev/null
+++ b/tests/foundry/common/prosemirror/util.test-d.ts
@@ -0,0 +1,18 @@
+/* eslint-disable import/extensions */
+import { expectTypeOf } from "vitest";
+import {
+  parseHTMLString,
+  serializeHTMLString,
+  transformSlice,
+} from "../../../../src/foundry/common/prosemirror/util.mjs";
+import type { ProseMirrorSliceTransformer } from "../../../../src/foundry/common/prosemirror/util.d.mts";
+import type { Node, Slice } from "prosemirror-model";
+
+declare const node: Node;
+
+expectTypeOf(parseHTMLString("")).toEqualTypeOf<Node>();
+expectTypeOf(serializeHTMLString(node)).toEqualTypeOf<string>();
+
+declare const slice: Slice;
+declare const transformer: ProseMirrorSliceTransformer;
+expectTypeOf(transformSlice(slice, transformer)).toEqualTypeOf<Slice>();
diff --git a/tests/foundry/public/scripts/clipper/clipper.test-d.ts b/tests/foundry/public/scripts/clipper/clipper.test-d.ts
index c39a53c3b..f862c18e4 100644
--- a/tests/foundry/public/scripts/clipper/clipper.test-d.ts
+++ b/tests/foundry/public/scripts/clipper/clipper.test-d.ts
@@ -29,9 +29,3 @@ expectTypeOf(
 ).toEqualTypeOf<boolean>();
 expectTypeOf(clipper.Execute(ClipperLib.ClipType.ctDifference, polyTree)).toEqualTypeOf<boolean>();
 expectTypeOf(clipper.Execute(ClipperLib.ClipType.ctDifference, paths)).toEqualTypeOf<boolean>();
-
-const clipperOffset = new ClipperLib.ClipperOffset(20, 0.25);
-
-expectTypeOf(
-  clipperOffset.AddPath(paths[0], ClipperLib.JoinType.jtMiter, ClipperLib.EndType.etClosedPolygon),
-).toEqualTypeOf<void>();