Repository: League-of-Foundry-Developers/foundry-vtt-types
Pull request #3211 (2025-03-03 06:31:09)

Types and tests for `tokens`, `smaa`, and `regions` under `client-esm/canvas`
title


Patch:
diff --git a/src/foundry/client-esm/canvas/regions/geometry.d.mts b/src/foundry/client-esm/canvas/regions/geometry.d.mts
index a6c93a0d6..f2eaae488 100644
--- a/src/foundry/client-esm/canvas/regions/geometry.d.mts
+++ b/src/foundry/client-esm/canvas/regions/geometry.d.mts
@@ -1,12 +1,12 @@
 /**
- * The geometry of a {@link Region}.
+ * The geometry of a {@link Region | `Region`}.
  * - Vertex Attribute: `aVertexPosition` (`vec2`)
  * - Draw Mode: `PIXI.DRAW_MODES.TRIANGLES`
  */
 declare class RegionGeometry extends PIXI.Geometry {
   /**
    * Create a RegionGeometry
-   * @internal
+   * @remarks Foundry marked `@internal`
    */
   constructor(region: Region.ConfiguredInstance);
 
@@ -15,17 +15,24 @@ declare class RegionGeometry extends PIXI.Geometry {
 
   /**
    * Update the buffers
-   * @internal
+   * @remarks Foundry marked `@internal`, is exclusively called externally in `Region##updateShapes`
    */
   protected _clearBuffers(): void;
 
   /**
    * Update the buffers
-   * @internal
+   * @remarks Foundry marked `@internal`, is exclusively called externally in `Region##updateShapes`
    */
   protected _updateBuffers(): void;
+}
+
+declare namespace RegionGeometry {
+  interface Any extends AnyRegionGeometry {}
+  type AnyConstructor = typeof AnyRegionGeometry;
+}
 
-  #regionGeometry: true;
+declare abstract class AnyRegionGeometry extends RegionGeometry {
+  constructor(arg0: never, ...args: never[]);
 }
 
 export default RegionGeometry;
diff --git a/src/foundry/client-esm/canvas/regions/mesh.d.mts b/src/foundry/client-esm/canvas/regions/mesh.d.mts
index e1c64cacf..4a22b9cc1 100644
--- a/src/foundry/client-esm/canvas/regions/mesh.d.mts
+++ b/src/foundry/client-esm/canvas/regions/mesh.d.mts
@@ -1,13 +1,12 @@
 /** A mesh of a {@link Region} */
 declare class RegionMesh extends PIXI.Container {
-  #regionMesh: true;
-
   /**
    * Create a RegionMesh
    * @param region        - The Region to create the RegionMesh from.
-   * @param shaderClass   - The shader class to use. @defaultValue `RegionShader`
+   * @param shaderClass   - The shader class to use. (default: `RegionShader`)
    */
-  constructor(region: Region.ConfiguredInstance, shaderClass?: AbstractBaseShader);
+  // shaderClass: not null (parameter default only)
+  constructor(region: Region.ConfiguredInstance, shaderClass?: AbstractBaseShader.AnyConstructor);
 
   /** The Region of this RegionMesh */
   get region(): Region.ConfiguredInstance;
@@ -17,7 +16,7 @@ declare class RegionMesh extends PIXI.Container {
 
   /** The blend mode assigned tot his RegionMesh */
   get blendMode(): PIXI.BLEND_MODES;
-  set blendMode(value: PIXI.BLEND_MODES);
+  set blendMode(value);
 
   /**
    * The tint applied to the mesh. This is a hex value.
@@ -26,25 +25,25 @@ declare class RegionMesh extends PIXI.Container {
    * @defaultValue `0xFFFFFF`
    */
   get tint(): number;
-  set tint(value: number);
+  set tint(value);
 
   /** The tint applied to the mesh. This is a hex value. A value of 0xFFFFFF will remove any tint effect. */
   protected _tintColor: PIXI.Color;
 
   /**
    * Cached tint value for the shader uniforms
-   * @internal
+   * @remarks Foundry marked `@internal`
    */
-  protected _cachedTint: [red: number, green: number, blue: number, alpha: number];
+  protected _cachedTint: Color.RGBAColorVector;
 
   /** Used to track a tint or alpha change to execute a recomputation of _cachedTint. */
   protected _tintAlphaDirty: boolean;
 
   /**
    * Initialize shader based on the shader class type.
-   * @param shaderClass   - The shader class, which must inherit from {@link AbstractBaseShader}.
+   * @param shaderClass - The shader class, which must inherit from {@link AbstractBaseShader | `AbstractBaseShader`}.
    */
-  setShaderClass(shaderClass: typeof AbstractBaseShader): void;
+  setShaderClass(shaderClass: AbstractBaseShader.AnyConstructor): void;
 
   override updateTransform(): void;
 
@@ -52,10 +51,22 @@ declare class RegionMesh extends PIXI.Container {
 
   protected override _calculateBounds(): void;
 
-  /** Tests if a point is indie this RegionMesh */
+  /**
+   * Tests if a point is inside this RegionMesh.
+   * @privateRemarks The rare instance of Foundry using the PIXI interface in *their* types
+   */
   containsPoint(point: PIXI.IPointData): boolean;
 
   override destroy(options?: PIXI.IDestroyOptions | boolean): void;
 }
 
+declare namespace RegionMesh {
+  interface Any extends AnyRegionMesh {}
+  type AnyConstructor = typeof AnyRegionMesh;
+}
+
+declare abstract class AnyRegionMesh extends RegionMesh {
+  constructor(arg0: never, ...args: never[]);
+}
+
 export default RegionMesh;
diff --git a/src/foundry/client-esm/canvas/regions/polygon-tree.d.mts b/src/foundry/client-esm/canvas/regions/polygon-tree.d.mts
index e5dc69050..a252bd76c 100644
--- a/src/foundry/client-esm/canvas/regions/polygon-tree.d.mts
+++ b/src/foundry/client-esm/canvas/regions/polygon-tree.d.mts
@@ -1,13 +1,9 @@
-import type { Point } from "../../../common/types.d.mts";
-
-/** The node of a {@link RegionPolygonTree}.*/
+/** The node of a {@link RegionPolygonTree | `RegionPolygonTree`}.*/
 declare class RegionPolygonTreeNode {
-  #regionPolygonTreeNode: true;
-
   /**
    * Create a RegionPolygonTreeNode.
    * @param parent    - The parent node.
-   * @internal
+   * @remarks Foundry marked `@internal`
    */
   constructor(parent: RegionPolygonTreeNode | null);
 
@@ -15,62 +11,77 @@ declare class RegionPolygonTreeNode {
    * Create a node from the Clipper path and add it to the children of the parent.
    * @param clipperPath   - The clipper path of this node.
    * @param parent        - The parent node or `null` if root.
-   * @internal
+   * @remarks Foundry marked `@internal`, called exclusively  {@link RegionPolygonTree._fromClipperPolyTree | `RegionPolygonTree._fromClipperPolyTree`}
    */
-  static _fromClipperPath(
-    clipperPath: ClipperLib.IntPoint[],
+  protected static _fromClipperPath(
+    clipperPath: ClipperLib.Path,
     parent: RegionPolygonTreeNode | null,
   ): RegionPolygonTreeNode;
 
   /** The parent of this node or `null` if this is the root node. */
   get parent(): RegionPolygonTreeNode | null;
 
-  /** The children of this node. */
-  get children(): ReadonlyArray<RegionPolygonTreeNode>;
+  /**
+   * The children of this node.
+   * @remarks Foundry types this as `ReadonlyArray<>`, but does nothing to prevent writes
+   * at runtime, just returning a reference to `this.#children`
+   */
+  get children(): RegionPolygonTreeNode[];
 
   /**
    * The depth of this node.
+   *
    * The depth of the root node is 0.
    */
   get depth(): number;
 
   /**
    * Is this a hole?
+   *
    * The root node is a hole.
    */
   get isHole(): boolean;
 
   /**
    * The Clipper path of this node.
+   *
    * It is empty in case of the root node.
+   * @remarks Foundry types this as `ReadonlyArray<>`, but does nothing to prevent writes
+   * at runtime, just returning a reference to `this.#clipperPath`
    */
-  get clipperPath(): ReadonlyArray<ClipperLib.IntPoint> | null;
+  get clipperPath(): ClipperLib.Path | null;
 
   /**
    * The polygon of this node.
+   *
    * It is `null` in case of the root node.
    */
   get polygon(): PIXI.Polygon | null;
 
   /**
    * The points of the polygon ([x0, y0, x1, y1, ...]).
+   *
    * They are `null` in case of the root node.
+   * @remarks Foundry types this as `ReadonlyArray<>`, but does nothing to prevent writes
+   * at runtime, just returning a reference to `this.polygon.points`
    */
-  get points(): ReadonlyArray<number> | null;
+  get points(): number[] | null;
 
   /**
    * The bounds of the polygon.
+   *
    * They are `null` in case of the root node.
    */
   get bounds(): PIXI.Rectangle | null;
 
+  /** @privateRemarks Recursively iterates all child nodes */
   [Symbol.iterator](): Generator<RegionPolygonTreeNode>;
 
   /**
    * Test whether given point is contained within this node.
-   * @param point     - The point.
+   * @param point - The point.
    */
-  testPoint(point: Point): boolean;
+  testPoint(point: Canvas.Point): boolean;
 
   /**
    * Test circle containment/intersection with this node.
@@ -80,22 +91,40 @@ declare class RegionPolygonTreeNode {
    *                  - 0: the circle is intersects the boundary.
    *                  - 1: the circle is in the interior and does not intersect the boundary.
    */
-  testCircle(center: Point, radius: number): -1 | 0 | 1;
+  testCircle(center: Canvas.Point, radius: number): -1 | 0 | 1;
+}
+
+declare namespace RegionPolygonTreeNode {
+  interface Any extends AnyRegionPolygonTreeNode {}
+  type AnyConstructor = typeof AnyRegionPolygonTreeNode;
 }
 
-/** The polygon tree of a {@link Region}. */
+/** The polygon tree of a {@link Region | `Region`}. */
 declare class RegionPolygonTree extends RegionPolygonTreeNode {
   /**
    * Create a RegionPolygonTree
-   * @internal
+   * @remarks Foundry marked `@internal`
    */
   constructor();
 
   /**
    * Create the tree from a Clipper polygon tree.
-   * @internal
+   * @remarks Foundry marked `@internal`, called exclusively from {@link Region#polygonTree | `Region#polygonTree`}
    */
-  static _fromClipperPolyTree(clipperPolyTree: ClipperLib.PolyTree): RegionPolygonTree;
+  protected static _fromClipperPolyTree(clipperPolyTree: ClipperLib.PolyTree): RegionPolygonTree;
+}
+
+declare namespace RegionPolygonTree {
+  interface Any extends AnyRegionPolygonTree {}
+  type AnyConstructor = typeof AnyRegionPolygonTree;
+}
+
+declare abstract class AnyRegionPolygonTreeNode extends RegionPolygonTreeNode {
+  constructor(arg0: never, ...args: never[]);
+}
+
+declare abstract class AnyRegionPolygonTree extends RegionPolygonTree {
+  constructor(arg0: never, ...args: never[]);
 }
 
 export default RegionPolygonTree;
diff --git a/src/foundry/client-esm/canvas/regions/shape.d.mts b/src/foundry/client-esm/canvas/regions/shape.d.mts
index 9bf364c53..a709eafd9 100644
--- a/src/foundry/client-esm/canvas/regions/shape.d.mts
+++ b/src/foundry/client-esm/canvas/regions/shape.d.mts
@@ -1,39 +1,22 @@
 import type { CircleShapeData, EllipseShapeData, PolygonShapeData, RectangleShapeData } from "../../data/_module.d.mts";
 
-declare namespace RegionShape {
-  interface Any extends RegionShape<any> {}
-
-  type ShapeData = CircleShapeData | EllipseShapeData | PolygonShapeData | RectangleShapeData;
-  type ShapeType = ShapeData["type"];
-
-  type CreatedRegionShape<ShapeData extends RegionShape.ShapeData> = _CreateReturnType<ShapeData, ShapeData["type"]>;
-
-  /** @internal */
-  type _CreateReturnType<ShapeData extends RegionShape.ShapeData, ShapeType extends RegionShape.ShapeType> =
-    | (ShapeType extends "circle" ? RegionCircle<ShapeData> : never)
-    | (ShapeType extends "ellipse" ? RegionEllipse<ShapeData> : never)
-    | (ShapeType extends "polygon" ? RegionPolygon<ShapeData> : never)
-    | (ShapeType extends "rectangle" ? RegionRectangle<ShapeData> : never);
-}
-
-/** A shape of a {@link Region} */
+/** A shape of a {@link Region | `Region`} */
 declare abstract class RegionShape<ShapeData extends RegionShape.ShapeData> {
-  #regionShape: true;
-
   /**
    * Create the RegionShape from the shape data.
-   * @param data    - The shape data.
+   * @param data - The shape data.
    */
   constructor(data: ShapeData);
 
   /**
    * Create the RegionShape from the shape data.
-   * @param data    - The shape data.
+   * @param data - The shape data.
    */
   static create<ShapeData extends RegionShape.ShapeData>(data: ShapeData): RegionShape.CreatedRegionShape<ShapeData>;
 
   /**
    * The data of this shape.
+   *
    * It is owned by the shape and must not be modified.
    */
   get data(): ShapeData;
@@ -43,31 +26,51 @@ declare abstract class RegionShape<ShapeData extends RegionShape.ShapeData> {
 
   /**
    * The Clipper paths of this shape.
+   *
    * The winding numbers are 1 or 0.
+   * @remarks Foundry types this as `ReadonlyArray<>`, but does nothing to prevent writes
+   * at runtime, just returning a reference to `this.#clipperPaths`
    */
-  get clipperPaths(): ReadonlyArray<ReadonlyArray<ClipperLib.IntPoint>>;
+  get clipperPaths(): ClipperLib.Paths;
 
   /** The Clipper polygon tree of this shape */
   get clipperPolyTree(): ClipperLib.PolyTree;
 
   /**
    * Create the Clipper polygon tree of this shape.
-   * This function may return a single positively-orientated and non-selfintersecting Clipper path instead of a tree,
+   *
+   * This function may return a single positively-orientated and non-self-intersecting Clipper path instead of a tree,
    * which is automatically converted to a Clipper polygon tree.
+   *
    * This function is called only once. It is not called if the shape is empty.
+   * @remarks Despite Foundry typing this as possibly returning a `PolyTree`, all four core subclasses return `Path`s,
+   * relying on the {@link RegionShape.clipperPolyTree | `#clipperPolyTree`} getter to convert and cache it.
    */
-  protected abstract _createClipperPolyTree(): ClipperLib.PolyTree | ClipperLib.IntPoint[];
+  protected abstract _createClipperPolyTree(): ClipperLib.PolyTree | ClipperLib.Path;
 
   /**
    * Draw shape into the graphics.
-   * @param graphics      - The graphics to draw the shape into.
-   * @internal
+   * @param graphics  - The graphics to draw the shape into.
+   * @remarks Foundry marked `@internal` but not `@abstract`, despite it throwing if not overridden
    */
   protected abstract _drawShape(graphics: PIXI.Graphics): void;
 }
 
+declare namespace RegionShape {
+  interface Any extends AnyRegionShape {}
+  type AnyConstructor = typeof AnyRegionShape;
+
+  type ShapeData = CircleShapeData | EllipseShapeData | PolygonShapeData | RectangleShapeData;
+
+  type CreatedRegionShape<ShapeData extends RegionShape.ShapeData> =
+    | (ShapeData extends CircleShapeData ? RegionCircle<ShapeData> : never)
+    | (ShapeData extends EllipseShapeData ? RegionEllipse<ShapeData> : never)
+    | (ShapeData extends PolygonShapeData ? RegionPolygon<ShapeData> : never)
+    | (ShapeData extends RectangleShapeData ? RegionRectangle<ShapeData> : never);
+}
+
 /**
- * A circle of a {@link Region}
+ * A circle of a {@link Region | `Region`}
  * @privateRemarks Technically `ShapeData` should extend `CircleShapeData`, but it's easier to instantiate if it's `RegionShape.ShapeData`.
  */
 declare class RegionCircle<ShapeData extends RegionShape.ShapeData> extends RegionShape<ShapeData> {
@@ -75,12 +78,13 @@ declare class RegionCircle<ShapeData extends RegionShape.ShapeData> extends Regi
 
   constructor(data: ShapeData);
 
-  protected override _createClipperPolyTree(): ClipperLib.PolyTree | ClipperLib.IntPoint[];
+  protected override _createClipperPolyTree(): ClipperLib.Path;
 
   protected override _drawShape(graphics: PIXI.Graphics): void;
 }
+
 /**
- * An ellipse of a {@link Region}
+ * An ellipse of a {@link Region | `Region`}
  * @privateRemarks Technically `ShapeData` should extend `EllipseShapeData`, but it's easier to instantiate if it's `RegionShape.ShapeData`.
  */
 declare class RegionEllipse<ShapeData extends RegionShape.ShapeData> extends RegionShape<ShapeData> {
@@ -88,31 +92,38 @@ declare class RegionEllipse<ShapeData extends RegionShape.ShapeData> extends Reg
 
   constructor(data: ShapeData);
 
-  protected override _createClipperPolyTree(): ClipperLib.PolyTree | ClipperLib.IntPoint[];
+  protected override _createClipperPolyTree(): ClipperLib.Path;
 
   protected override _drawShape(graphics: PIXI.Graphics): void;
 }
+
 /**
- * A polygon of a {@link Region}
+ * A polygon of a {@link Region | `Region`}
  * @privateRemarks Technically `ShapeData` should extend `PolygonShapeData`, but it's easier to instantiate if it's `RegionShape.ShapeData`.
  */
 declare class RegionPolygon<ShapeData extends RegionShape.ShapeData> extends RegionShape<ShapeData> {
   constructor(params: ShapeData);
 
-  protected override _createClipperPolyTree(): ClipperLib.PolyTree | ClipperLib.IntPoint[];
+  protected override _createClipperPolyTree(): ClipperLib.Path;
 
   protected override _drawShape(graphics: PIXI.Graphics): void;
 }
+
 /**
- * A rectangle of a {@link Region}
+ * A rectangle of a {@link Region | `Region`}
  * @privateRemarks Technically `ShapeData` should extend `RectangleShapeData`, but it's easier to instantiate if it's `RegionShape.ShapeData`.
  */
 declare class RegionRectangle<ShapeData extends RegionShape.ShapeData> extends RegionShape<ShapeData> {
   constructor(params: ShapeData);
 
-  protected override _createClipperPolyTree(): ClipperLib.PolyTree | ClipperLib.IntPoint[];
+  protected override _createClipperPolyTree(): ClipperLib.Path;
 
   protected override _drawShape(graphics: PIXI.Graphics): void;
 }
 
+// Only RegionShape is exported, so `Any_` classes and types for the subclasses have been omitted
+declare abstract class AnyRegionShape extends RegionShape<RegionShape.ShapeData> {
+  constructor(arg0: never, ...args: never[]);
+}
+
 export default RegionShape;
diff --git a/src/foundry/client-esm/canvas/scene-manager.d.mts b/src/foundry/client-esm/canvas/scene-manager.d.mts
index 2e0d64e4a..d497caf7d 100644
--- a/src/foundry/client-esm/canvas/scene-manager.d.mts
+++ b/src/foundry/client-esm/canvas/scene-manager.d.mts
@@ -1,5 +1,4 @@
-import type { Identity } from "../../../utils/index.d.mts";
-
+import type { AnyFunction, Identity } from "fvtt-types/utils";
 /**
  * A framework for imbuing special scripted behaviors into a single specific Scene.
  * Managed scenes are registered in CONFIG.Canvas.managedScenes.
@@ -48,7 +47,7 @@ declare class SceneManager {
   /**
    * The SceneManager is constructed by passing a reference to the active Scene document.
    */
-  constructor(scene: Scene);
+  constructor(scene: Scene.ConfiguredInstance);
 
   /**
    * The managed Scene
@@ -84,7 +83,7 @@ declare class SceneManager {
   /**
    * Register additional hook functions are only used while this Scene is active and is automatically deactivated.
    */
-  registerHooks(hookName: string, handler: (...args: unknown[]) => unknown): void;
+  registerHooks(hookName: string, handler: AnyFunction): void;
 
   /**
    * Deactivate Hook functions that were added specifically for this Scene.
diff --git a/src/foundry/client-esm/canvas/smaa/blend.d.mts b/src/foundry/client-esm/canvas/smaa/blend.d.mts
index f29edbf01..3950bfddc 100644
--- a/src/foundry/client-esm/canvas/smaa/blend.d.mts
+++ b/src/foundry/client-esm/canvas/smaa/blend.d.mts
@@ -1,6 +1,17 @@
 /**
- * The blending weight calculation filter for {@link foundry.canvas.SMAAFilter}.
+ * The neighborhood blending filter for {@link foundry.canvas.SMAAFilter | `SMAAFilter`}.
  */
-export default class SMAABWeightCalculationFilter extends PIXI.Filter {
-  constructor(config: foundry.canvas.SMAAFilter.SMAAFilterConfig);
+declare class SMAANeighborhoodBlendingFilter extends PIXI.Filter {
+  constructor();
 }
+
+declare namespace SMAANeighborhoodBlendingFilter {
+  interface Any extends AnySMAANeighborhoodBlendingFilter {}
+  type AnyConstructor = typeof AnySMAANeighborhoodBlendingFilter;
+}
+
+declare abstract class AnySMAANeighborhoodBlendingFilter extends SMAANeighborhoodBlendingFilter {
+  constructor(arg0: never, ...args: never[]);
+}
+
+export default SMAANeighborhoodBlendingFilter;
diff --git a/src/foundry/client-esm/canvas/smaa/edges.d.mts b/src/foundry/client-esm/canvas/smaa/edges.d.mts
index 0ba60c070..da74c5b61 100644
--- a/src/foundry/client-esm/canvas/smaa/edges.d.mts
+++ b/src/foundry/client-esm/canvas/smaa/edges.d.mts
@@ -1,6 +1,28 @@
+import type { IntentionalPartial, RequiredProps } from "../../../../utils/index.d.mts";
+
 /**
- * The edge detection filter for {@link foundry.canvas.SMAAFilter}.
+ * The edge detection filter for {@link foundry.canvas.SMAAFilter | `SMAAFilter`}.
  */
-export default class SMAAEdgeDetectionFilter extends PIXI.Filter {
-  constructor(config: foundry.canvas.SMAAFilter.SMAAFilterConfig);
+declare class SMAAEdgeDetectionFilter extends PIXI.Filter {
+  constructor(config: SMAAEdgeDetectionFilter.Config);
 }
+
+declare namespace SMAAEdgeDetectionFilter {
+  interface Any extends AnySMAAEdgeDetectionFilter {}
+  type AnyConstructor = typeof AnySMAAEdgeDetectionFilter;
+
+  /**
+   * @privateRemarks The SMAAEdgeDetectionFilter constructor passes `config` to an unexported local
+   * function that only uses two properties of the interface
+   */
+  type Config = RequiredProps<
+    IntentionalPartial<foundry.canvas.SMAAFilter.Config>,
+    "threshold" | "localContrastAdaptionFactor"
+  >;
+}
+
+declare abstract class AnySMAAEdgeDetectionFilter extends SMAAEdgeDetectionFilter {
+  constructor(arg0: never, ...args: never[]);
+}
+
+export default SMAAEdgeDetectionFilter;
diff --git a/src/foundry/client-esm/canvas/smaa/smaa.d.mts b/src/foundry/client-esm/canvas/smaa/smaa.d.mts
index f80e460e9..1a89c095b 100644
--- a/src/foundry/client-esm/canvas/smaa/smaa.d.mts
+++ b/src/foundry/client-esm/canvas/smaa/smaa.d.mts
@@ -1,55 +1,154 @@
-import type { CLEAR_MODES, FilterState, FilterSystem, RenderTexture } from "pixi.js";
-
-import type { InexactPartial } from "fvtt-types/utils";
+import type { Brand, InexactPartial } from "fvtt-types/utils";
 
 declare class SMAAFilter extends PIXI.Filter {
   /**
-   * @param config    - The config (defaults: SMAAFilter.PRESETS.DEFAULT)
+   * @param config - The config
+   * @remarks The one place Foundry makes one of these it passes no config
+   * @privateRemarks Foundry references `SMAAFilter.PRESETS.DEFAULT` as the default values for `config`,
+   * but that key does not exist in 12.331 or 11.315, and appears to just be a docs error.
    */
-  constructor(config?: InexactPartial<SMAAFilter.SMAAFilterConfig>);
+  // config: not null (destructured)
+  constructor(config?: SMAAFilter.ConstructorOptions);
 
   // a placeholder private method to help subclassing
   #smaaFilter: true;
 
   /**
    * The presets.
+   * @remarks Unused in 12.331
    */
-  static get PRESETS(): Record<string, SMAAFilter.SMAAFilterConfig>;
+  static get PRESETS(): SMAAFilter.Presets;
 
   override apply(
-    filterManager: FilterSystem,
-    input: RenderTexture,
-    output: RenderTexture,
-    clearMode: CLEAR_MODES | undefined,
-    currentState: FilterState,
+    filterManager: PIXI.FilterSystem,
+    input: PIXI.RenderTexture,
+    output: PIXI.RenderTexture,
+    clearMode: PIXI.CLEAR_MODES | undefined,
+    currentState: PIXI.FilterState,
   ): void;
 }
 
 declare namespace SMAAFilter {
-  interface SMAAFilterConfig {
-    /** Specifies the threshold or sensitivity to edges. Lowering this value you will be able to detect more edges at the expense of performance. Range: [0, 0.5]. 0.1 is a reasonable value, and allows to catch most visible edges. 0.05 is a rather overkill value, that allows to catch 'em all. */
+  interface Any extends AnySMAAFilter {}
+  type AnyConstructor = typeof AnySMAAFilter;
+
+  type PRESETS = Brand<Config, "SMAAFilter.PRESETS">;
+
+  interface Presets {
+    LOW: {
+      threshold: 0.15;
+      localContrastAdaptionFactor: 2.0;
+      maxSearchSteps: 4;
+      maxSearchStepsDiag: 0;
+      cornerRounding: 0;
+      disableDiagDetection: true;
+      disableCornerDetection: true;
+    } & PRESETS;
+    MEDIUM: {
+      threshold: 0.1;
+      localContrastAdaptionFactor: 2.0;
+      maxSearchSteps: 8;
+      maxSearchStepsDiag: 0;
+      cornerRounding: 0;
+      disableDiagDetection: true;
+      disableCornerDetection: true;
+    } & PRESETS;
+    HIGH: {
+      threshold: 0.1;
+      localContrastAdaptionFactor: 2.0;
+      maxSearchSteps: 16;
+      maxSearchStepsDiag: 8;
+      cornerRounding: 25;
+      disableDiagDetection: false;
+      disableCornerDetection: false;
+    } & PRESETS;
+    ULTRA: {
+      threshold: 0.05;
+      localContrastAdaptionFactor: 2.0;
+      maxSearchSteps: 32;
+      maxSearchStepsDiag: 16;
+      cornerRounding: 25;
+      disableDiagDetection: false;
+      disableCornerDetection: false;
+    } & PRESETS;
+  }
+
+  interface Config {
+    /**
+     * Specifies the threshold or sensitivity to edges. Lowering this value you will be able to detect more
+     * edges at the expense of performance.
+     *
+     * Range: [0, 0.5].
+     *
+     * 0.1 is a reasonable value, and allows to catch
+     * most visible edges. 0.05 is a rather overkill value, that allows to catch 'em all.
+     * @defaultValue `0.1`
+     * @remarks Can't be `null` as it only has a parameter default
+     */
     threshold: number;
 
-    /** If there is an neighbor edge that has SMAA_LOCAL_CONTRAST_FACTOR times bigger contrast than current edge, current edge will be discarded.
-     *  This allows to eliminate spurious crossing edges, and is based on the fact that, if there is too much contrast in a direction, that will hide perceptually contrast in the other neighbors.
+    /**
+     * If there is an neighbor edge that has SMAA_LOCAL_CONTRAST_FACTOR times bigger contrast than current
+     * edge, current edge will be discarded. This allows to eliminate spurious crossing edges, and is based
+     * on the fact that, if there is too much contrast in a direction, that will hide perceptually contrast
+     * in the other neighbors.
+     * @defaultValue `2.0`
+     * @remarks Can't be `null` as it only has a parameter default
      */
     localContrastAdaptionFactor: number;
 
-    /** Specifies the maximum steps performed in the horizontal/vertical pattern searches, at each side of the pixel. In number of pixels, it's actually the double. So the maximum line length perfectly handled by, for example 16, is 64 (by perfectly, we meant that longer lines won't look as good, but still antialiased. Range: [0, 112]. */
+    /**
+     * Specifies the maximum steps performed in the horizontal/vertical pattern searches, at each side of the
+     * pixel. In number of pixels, it's actually the double. So the maximum line length perfectly handled by,
+     * for example 16, is 64 (by perfectly, we meant that longer lines won't look as good, but still antialiased).
+     *
+     * Range: [0, 112].
+     * @defaultValue `16`
+     * @remarks Can't be `null` as it only has a parameter default
+     */
     maxSearchSteps: number;
 
-    /** Specifies the maximum steps performed in the diagonal pattern searches, at each side of the pixel. In this case we jump one pixel at time, instead of two. Range: [0, 20]. */
+    /**
+     * Specifies the maximum steps performed in the diagonal pattern searches, at each side of the pixel. In this
+     * case we jump one pixel at time, instead of two.
+     *
+     * Range: [0, 20].
+     * @defaultValue `8`
+     * @remarks Can't be `null` as it only has a parameter default
+     */
     maxSearchStepsDiag: number;
 
-    /** Specifies how much sharp corners will be rounded. Range: [0, 100]. */
+    /**
+     * Specifies how much sharp corners will be rounded.
+     *
+     * Range: [0, 100].
+     * @defaultValue `25`
+     * @remarks Can't be `null` as it only has a parameter default
+     */
     cornerRounding: number;
 
-    /** Is diagonal detection disabled? */
+    /**
+     * Is diagonal detection disabled?
+     * @defaultValue `false`
+     * @remarks Can't be `null` as it only has a parameter default
+     */
     disableDiagDetection: boolean;
 
-    /** Is corner detection disabled? */
+    /**
+     * Is corner detection disabled?
+     * @defaultValue `false`
+     * @remarks Can't be `null` as it only has a parameter default
+     */
     disableCornerDetection: boolean;
   }
+
+  type _ConstructorOptions = InexactPartial<Config>;
+
+  interface ConstructorOptions extends _ConstructorOptions {}
+}
+
+declare abstract class AnySMAAFilter extends SMAAFilter {
+  constructor(arg0: never, ...args: never[]);
 }
 
 export default SMAAFilter;
diff --git a/src/foundry/client-esm/canvas/smaa/weights.d.mts b/src/foundry/client-esm/canvas/smaa/weights.d.mts
index 03c48ad16..6f67710ca 100644
--- a/src/foundry/client-esm/canvas/smaa/weights.d.mts
+++ b/src/foundry/client-esm/canvas/smaa/weights.d.mts
@@ -1,6 +1,29 @@
+import type { Identity, IntentionalPartial, RequiredProps } from "../../../../utils/index.d.mts";
+
 /**
- * The neighborhood blending filter for {@link foundry.canvas.SMAAFilter}.
+ * The blending weight calculation filter for {@link foundry.canvas.SMAAFilter | `SMAAFilter`}.
  */
-export default class SMAANeighborhoodBlendingFilter extends PIXI.Filter {
-  constructor();
+declare class SMAABWeightCalculationFilter extends PIXI.Filter {
+  constructor(config: SMAABWeightCalculationFilter.Config);
 }
+
+declare namespace SMAABWeightCalculationFilter {
+  interface Any extends AnySMAABWeightCalculationFilter {}
+  interface AnyConstructor extends Identity<typeof AnySMAABWeightCalculationFilter> {}
+
+  type Config = RequiredProps<
+    IntentionalPartial<foundry.canvas.SMAAFilter.Config>,
+    | "maxSearchSteps"
+    | "threshold"
+    | "maxSearchStepsDiag"
+    | "cornerRounding"
+    | "disableCornerDetection"
+    | "disableDiagDetection"
+  >;
+}
+
+declare abstract class AnySMAABWeightCalculationFilter extends SMAABWeightCalculationFilter {
+  constructor(arg0: never, ...args: never[]);
+}
+
+export default SMAABWeightCalculationFilter;
diff --git a/src/foundry/client-esm/canvas/tokens/ring-config.d.mts b/src/foundry/client-esm/canvas/tokens/ring-config.d.mts
index 910f75e88..2c586ac32 100644
--- a/src/foundry/client-esm/canvas/tokens/ring-config.d.mts
+++ b/src/foundry/client-esm/canvas/tokens/ring-config.d.mts
@@ -1,5 +1,5 @@
+import type { InitializedOn } from "../../../../utils/index.d.mts";
 import type DynamicRingData from "./ring-data.d.mts";
-import type TokenRing from "./ring.d.mts";
 
 /**
  * Token Ring configuration Singleton Class.
@@ -76,14 +76,17 @@ import type TokenRing from "./ring.d.mts";
  * ```
  */
 declare class TokenRingConfig {
-  #TokenRingConfig: true;
-
   constructor();
 
   /**
    * Core token rings used in Foundry VTT.
    * Each key is a string identifier for a ring, and the value is an object containing the ring's data.
    * This object is frozen to prevent any modifications.
+   * @remarks The outer object is frozen, but the individual rings' data isn't, and that object gets passed into a {@link DynamicRingData | `DynamicRingData`} constructor, leading to, for example,
+   * ```js
+   * CONFIG.Token.ring.getConfig("coreSteel")._source === TokenRingConfig.CORE_TOKEN_RINGS.coreSteel
+   * ```
+   * after {@link TokenRingConfig.initialize | `initialize`} has been called, which happens between the `setup` and `ready` hooks
    */
   static CORE_TOKEN_RINGS: TokenRingConfig.CoreTokenRings;
 
@@ -92,13 +95,21 @@ declare class TokenRingConfig {
    */
   static CORE_TOKEN_RINGS_FIT_MODES: TokenRingConfig.CoreTokenRingsFitModes;
 
-  /** Register the token ring config and initialize it */
+  /**
+   * Register the token ring config and initialize it
+   * @remarks Calls the {@link Hooks.StaticCallbacks.initializeDynamicTokenRingConfig | `initializeDynamicTokenRingConfig`} hook via {@link Hooks.callAll | `Hooks.callAll`}
+   */
   static initialize(): void;
 
   /** Register game settings used by the Token Ring */
   static registerSettings(): void;
 
-  /** A mapping of token subject paths where modules or systems have configured subject images. */
+  /**
+   * A mapping of token subject paths where modules or systems have configured subject images.
+   * @defaultValue `{}`
+   * @remarks Not directly used anywhere in this class, essentially just a global cache. The system's `flags.tokenRingSubjectMappings`, if any, get assigned here in {@link Game.initializeConfig | `Game#initializeConfig`},
+   * and they're read in {@link TokenDocument._inferRingSubjectTexture | `TokenDocument#_inferRingSubjectTexture`}
+   */
   subjectPaths: Record<string, string>;
 
   /**
@@ -109,42 +120,51 @@ declare class TokenRingConfig {
 
   /**
    * Get the current ring class.
+   * @remarks Since `##currentConfig` is a reference to a `##configs` entry, not a copy, setting this will persist in that config
    */
-  get ringClass(): typeof TokenRing;
+  get ringClass(): DynamicRingData["framework"]["ringClass"];
   set ringClass(value);
 
   /** Get the current effects. */
-  get effects(): Record<string, string>;
+  get effects(): DynamicRingData["effects"];
 
   /** Get the current spritesheet. */
-  get spritesheet(): string;
+  get spritesheet(): DynamicRingData["spritesheet"];
 
-  /** Get the current shader class. */
-  get shaderClass(): typeof PrimaryBaseSamplerShader;
+  /**
+   * Get the current shader class.
+   * @remarks Since `##currentConfig` is a reference to a `##configs` entry, not a copy, setting this will persist in that config
+   */
+  get shaderClass(): DynamicRingData["framework"]["shaderClass"];
   set shaderClass(value);
 
   /** Get the current localized label */
-  get label(): string;
+  get label(): DynamicRingData["label"];
 
   /** Get the current id. */
-  get id(): string;
+  get id(): DynamicRingData["id"];
 
-  /** Is a custom fit mode active? */
+  /**
+   * Is a custom fit mode active?
+   * @remarks Anything other than `subject` is "custom", but the only other fit mode is `grid`
+   */
   get isGridFitMode(): boolean;
 
   /**
    * Add a new ring configuration.
    * @param id      - The id of the ring configuration.
    * @param config  - The configuration object for the ring.
+   * @throws If called outside a callback for the {@link Hooks.StaticCallbacks.initializeDynamicTokenRingConfig | `initializeDynamicTokenRingConfig`} hook
+   * @remarks The actual error thrown incorrectly refers to a non-existent `registerDynamicTokenRing` hook
    */
-  addConfig(id: string, config: TokenRingConfig): void;
+  addConfig(id: string, config: DynamicRingData): void;
 
   /**
    * Get a ring configuration.
    * @param id  - The id of the ring configuration.
    * @returns   - The ring configuration object.
    */
-  getConfig(id: string): TokenRingConfig;
+  getConfig(id: string): DynamicRingData;
 
   /**
    * Use a ring configuration.
@@ -159,11 +179,19 @@ declare class TokenRingConfig {
   /** Get the labels of all configurations. */
   get configLabels(): Record<string, string>;
 
-  /** @deprecated since v11 */
+  /**
+   * @deprecated since v12, until v14
+   * @remarks "TokenRingConfig#configNames is deprecated and replaced by TokenRingConfig#configIDs"
+   *
+   * Foundry comment claims deprecated since v11 - possibly a dnd5e-implementation-related deprecation?
+   */
   get configNames(): string[];
 }
 
 declare namespace TokenRingConfig {
+  interface Any extends AnyTokenRingConfig {}
+  type AnyConstructor = typeof AnyTokenRingConfig;
+
   /** Token ring fit modes for dynamic token ring visualization */
   interface RingFitMode {
     /** The fit mode identifier. */
@@ -173,18 +201,52 @@ declare namespace TokenRingConfig {
     label: string;
   }
 
-  /** Dynamic ring id. */
-  type DynamicRingId = string;
+  /**
+   * Core token rings fit modes used in Foundry VTT.
+   * @remarks Only the two provided core fit modes are checked against, by hardcoded IDs
+   */
+  interface CoreTokenRingsFitModes {
+    readonly subject: RingFitMode;
+    readonly grid: RingFitMode;
+  }
+
+  type CoreRingIDs = "coreSteel" | "coreBronze";
+
+  /**
+   * @remarks The type of any given {@link TokenRingConfig.CORE_TOKEN_RINGS | `TokenRingConfig.CORE_TOKEN_RINGS`} entry prior to
+   * {@link TokenRingConfig.initialize | `TokenRingConfig#initialize`} being called between the `setup` and `ready` hooks; Plain objects at this point
+   */
+  type InitialCoreRingData = Required<Pick<SourceCoreRingData, "id" | "label" | "spritesheet">>;
+
+  type InitialCoreRings = Record<CoreRingIDs, InitialCoreRingData>;
+
+  /**
+   * @remarks Due to the way the core configs are initialized, {@link TokenRingConfig.CORE_TOKEN_RINGS | `TokenRingConfig.CORE_TOKEN_RINGS`}
+   * ends up becoming the `_source` of the constructed DataModels in {@link CONFIG.Token.ring | `CONFIG.Token.ring`}, that is:
+   * ```js
+   * CONFIG.Token.ring.getConfig("coreSteel")._source === TokenRingConfig.CORE_TOKEN_RINGS.coreSteel
+   * ```
+   * after {@link TokenRingConfig.initialize | `TokenRingConfig#initialize`} has been called, which happens between the `setup` and `ready` hooks
+   */
+  type SourceCoreRingData = foundry.data.fields.SchemaField.InnerPersistedType<DynamicRingData.Schema>;
+
+  type SourceCoreRings = Record<CoreRingIDs, SourceCoreRingData>;
 
   /**
    * Core token rings used in Foundry VTT.
    * Each key is a string identifier for a ring, and the value is an object containing the ring's data.
    * This object is frozen to prevent any modifications.
+   * @remarks The outer object is frozen, but the individual rings' data isn't, and that object gets passed into a {@link DynamicRingData | `DynamicRingData`} constructor, leading to, for example,
+   * ```js
+   * CONFIG.Token.ring.getConfig("coreSteel")._source === TokenRingConfig.CORE_TOKEN_RINGS.coreSteel
+   * ```
+   * after {@link TokenRingConfig.initialize | `TokenRingConfig#initialize`} has been called, which happens between the `setup` and `ready` hooks
    */
-  interface CoreTokenRings extends Readonly<Record<DynamicRingId, DynamicRingData.RingData>> {}
+  type CoreTokenRings = InitializedOn<SourceCoreRings, "ready", InitialCoreRings>;
+}
 
-  /** Core token rings fit modes used in Foundry VTT. */
-  interface CoreTokenRingsFitModes extends Readonly<Record<string, RingFitMode>> {}
+declare abstract class AnyTokenRingConfig extends TokenRingConfig {
+  constructor(arg0: never, ...args: never[]);
 }
 
 export default TokenRingConfig;
diff --git a/src/foundry/client-esm/canvas/tokens/ring-data.d.mts b/src/foundry/client-esm/canvas/tokens/ring-data.d.mts
index 432609e4a..5c9c77fb4 100644
--- a/src/foundry/client-esm/canvas/tokens/ring-data.d.mts
+++ b/src/foundry/client-esm/canvas/tokens/ring-data.d.mts
@@ -52,6 +52,7 @@ declare namespace DynamicRingData {
       /**
        * The manager class responsible for rendering token rings.
        * @defaultValue `TokenRing`
+       * @remarks Stays `typeof TokenRing` as its constructor must take a `Token.Implementation` argument
        */
       ringClass: ClassReferenceField<typeof TokenRing, { initial: typeof TokenRing; baseClass: typeof TokenRing }>;
 
@@ -60,115 +61,86 @@ declare namespace DynamicRingData {
        * @defaultValue `TokenRingSamplerShader`
        */
       shaderClass: ClassReferenceField<
-        typeof PrimaryBaseSamplerShader,
-        { initial: typeof TokenRingSamplerShader; baseClass: typeof PrimaryBaseSamplerShader }
+        PrimaryBaseSamplerShader.AnyConstructor,
+        { initial: PrimaryBaseSamplerShader.AnyConstructor; baseClass: PrimaryBaseSamplerShader.AnyConstructor }
       >;
     }>;
   }
+}
 
-  interface RingData {
-    /** The id of this Token Ring configuration. */
-    id: string;
+/**
+ * A special subclass of [DataField]{@link DataField} used to reference a class definition.
+ * @typeParam BaseClass - The base class constructor linked to this data field.
+ * @typeParam Options         - the options of the ClassReferenceField instance
+ * @typeParam AssignmentType  - the type of the allowed assignment values of the ClassReferenceField
+ * @typeParam InitializedType - the type of the initialized values of the ClassReferenceField
+ * @typeParam PersistedType   - the type of the persisted values of the ClassReferenceField
+ */
+declare class ClassReferenceField<
+  BaseClass extends AnyConstructor,
+  Options extends ClassReferenceField.Options<BaseClass> = ClassReferenceField.DefaultOptions,
+  AssignmentType = ClassReferenceField.AssignmentType<BaseClass, Options>,
+  InitializedType = ClassReferenceField.InitializedType<BaseClass, Options>,
+  PersistedType = InitializedType,
+> extends DataField<Options, AssignmentType, InitializedType, PersistedType> {
+  #ClassReferenceField: true;
 
-    /** The label of this Token Ring configuration. */
-    label: string;
+  constructor(options?: Options);
 
-    /** The spritesheet path which provides token ring frames for various sized creatures. */
-    spritesheet: string;
+  static override get _defaults(): DataField.Options.Any;
 
-    /** Registered special effects which can be applied to a token ring. */
-    effects: Record<string, string>;
+  protected override _cast(value: AssignmentType): InitializedType;
 
-    framework: {
-      /**
-       * The manager class responsible for rendering token rings.
-       * @defaultValue `TokenRing`
-       */
-      ringClass: typeof TokenRing;
-
-      /**
-       * The shader class used to render the TokenRing.
-       * @defaultValue `TokenRingSamplerShader`
-       */
-      shaderClass: typeof PrimaryBaseSamplerShader;
-    };
-  }
-
-  namespace ClassReferenceField {
-    /**
-     * A shorthand for the options of a ClassReferenceField class.
-     * @typeParam BaseClass - The base class constructor linked to this data field.
-     */
-    interface Options<BaseClass extends AnyConstructor> extends DataField.Options<BaseClass> {
-      /**
-       *The base class linked to this data field.
-       */
-      baseClass?: BaseClass;
-    }
-
-    type DefaultOptions = SimpleMerge<
-      DataField.DefaultOptions,
-      {
-        required: true;
-      }
-    >;
-
-    /**
-     * A helper type for the given options type merged into the default options of the ClassReferenceField class.
-     * @typeParam BaseClass - The base class constructor linked to this data field.
-     * @typeParam Options - the options that override the default options
-     */
-    type MergedOptions<
-      BaseClass extends AnyConstructor,
-      Options extends ClassReferenceField.Options<BaseClass>,
-    > = SimpleMerge<DefaultOptions, Options>;
-
-    /**
-     * A shorthand for the assignment type of a ClassReferenceField class.
-     * @typeParam BaseClass - The base class constructor linked to this data field.
-     * @typeParam Options - the options that override the default options
-     */
-    type AssignmentType<
-      BaseClass extends AnyConstructor,
-      Options extends ClassReferenceField.Options<BaseClass>,
-    > = DataField.DerivedAssignmentType<AnyConstructor, MergedOptions<BaseClass, Options>>;
+  override getInitialValue(data: DataField.CleanOptions["source"]): InitializedType;
+}
 
+declare namespace ClassReferenceField {
+  /**
+   * A shorthand for the options of a ClassReferenceField class.
+   * @typeParam BaseClass - The base class constructor linked to this data field.
+   */
+  interface Options<BaseClass extends AnyConstructor> extends DataField.Options<BaseClass> {
     /**
-     * A shorthand for the initialized type of a NumberField class.
-     * @typeParam BaseClass - The base class constructor linked to this data field.
-     * @typeParam Options - the options that override the default options
+     *The base class linked to this data field.
      */
-    type InitializedType<
-      BaseClass extends AnyConstructor,
-      Options extends ClassReferenceField.Options<BaseClass>,
-    > = DataField.DerivedInitializedType<BaseClass, MergedOptions<BaseClass, Options>>;
+    baseClass?: BaseClass;
   }
 
+  type DefaultOptions = SimpleMerge<
+    DataField.DefaultOptions,
+    {
+      required: true;
+    }
+  >;
+
   /**
-   * A special subclass of [DataField]{@link DataField} used to reference a class definition.
+   * A helper type for the given options type merged into the default options of the ClassReferenceField class.
    * @typeParam BaseClass - The base class constructor linked to this data field.
-   * @typeParam Options         - the options of the ClassReferenceField instance
-   * @typeParam AssignmentType  - the type of the allowed assignment values of the ClassReferenceField
-   * @typeParam InitializedType - the type of the initialized values of the ClassReferenceField
-   * @typeParam PersistedType   - the type of the persisted values of the ClassReferenceField
+   * @typeParam Options - the options that override the default options
    */
-  class ClassReferenceField<
+  type MergedOptions<
     BaseClass extends AnyConstructor,
-    Options extends ClassReferenceField.Options<BaseClass> = ClassReferenceField.DefaultOptions,
-    AssignmentType = ClassReferenceField.AssignmentType<BaseClass, Options>,
-    InitializedType = ClassReferenceField.InitializedType<BaseClass, Options>,
-    PersistedType = InitializedType,
-  > extends DataField<Options, AssignmentType, InitializedType, PersistedType> {
-    #ClassReferenceField: true;
+    Options extends ClassReferenceField.Options<BaseClass>,
+  > = SimpleMerge<DefaultOptions, Options>;
 
-    constructor(options?: Options);
-
-    static override get _defaults(): DataField.Options.Any;
-
-    protected override _cast(value: AssignmentType): InitializedType;
+  /**
+   * A shorthand for the assignment type of a ClassReferenceField class.
+   * @typeParam BaseClass - The base class constructor linked to this data field.
+   * @typeParam Options - the options that override the default options
+   */
+  type AssignmentType<
+    BaseClass extends AnyConstructor,
+    Options extends ClassReferenceField.Options<BaseClass>,
+  > = DataField.DerivedAssignmentType<AnyConstructor, MergedOptions<BaseClass, Options>>;
 
-    override getInitialValue(data: DataField.CleanOptions["source"]): InitializedType;
-  }
+  /**
+   * A shorthand for the initialized type of a NumberField class.
+   * @typeParam BaseClass - The base class constructor linked to this data field.
+   * @typeParam Options - the options that override the default options
+   */
+  type InitializedType<
+    BaseClass extends AnyConstructor,
+    Options extends ClassReferenceField.Options<BaseClass>,
+  > = DataField.DerivedInitializedType<BaseClass, MergedOptions<BaseClass, Options>>;
 }
-
 export default DynamicRingData;
diff --git a/src/foundry/client-esm/canvas/tokens/ring.d.mts b/src/foundry/client-esm/canvas/tokens/ring.d.mts
index 48394a674..b043c861b 100644
--- a/src/foundry/client-esm/canvas/tokens/ring.d.mts
+++ b/src/foundry/client-esm/canvas/tokens/ring.d.mts
@@ -1,28 +1,39 @@
-import type { InitializedOn } from "fvtt-types/utils";
+import type { Brand, InitializedOn } from "fvtt-types/utils";
+import type DynamicRingData from "./ring-data.d.mts";
 
 /**
  * Dynamic Token Ring Manager.
  */
 declare class TokenRing {
-  #TokenRing: true;
-
   /** A `TokenRing` is constructed by providing a reference to a `Token` object. */
   constructor(token: Token.ConfiguredInstance);
 
   /** The effects which could be applied to a token ring (using bitwise operations) */
   static effects: TokenRing.Effects;
 
-  /** Is the token rings framework enabled? Will be `null` if the system hasn't initialized yet. */
-  static get initialized(): InitializedOn<boolean, "init">;
+  /**
+   * Is the token rings framework enabled? Will be `null` if the system hasn't initialized yet.
+   * @remarks {@link TokenRing.initialize | `CONFIG.Token.ring.ringClass.initialize`} is called inside {@link Canvas.initialize | `Canvas.initialize`}, which is called between the `setup` and `ready` hooks.
+   */
+  static get initialized(): InitializedOn<true, "ready", null>;
 
-  /** Token Rings sprite sheet base texture. */
-  static baseTexture: PIXI.BaseTexture;
+  /**
+   * Token Rings sprite sheet base texture.
+   * @remarks Only `undefined` prior to first canvas draw; set in {@link createAssetsUVs | `createAssetsUVs`}
+   */
+  static baseTexture: PIXI.BaseTexture | undefined;
 
-  /** Rings and background textures UVs and center offset. */
-  static texturesData: Record<string, { UVs: Float32Array; center: { x: number; y: number } }>;
+  /**
+   * Rings and background textures UVs and center offset.
+   * @remarks Only `undefined` prior to first canvas draw; set in {@link createAssetsUVs | `createAssetsUVs`}
+   */
+  static texturesData: Record<string, TokenRing.TextureData> | undefined;
 
-  /** The token ring shader class definition. */
-  static tokenRingSamplerShader: TokenRing.SampleShaderClass;
+  /**
+   * The token ring shader class definition.
+   * @remarks Set in {@link TokenRing.initialize | `initialize`}
+   */
+  static tokenRingSamplerShader: InitializedOn<DynamicRingData["framework"]["shaderClass"], "ready", undefined>;
 
   /** Initialize the Token Rings system, registering the batch plugin and patching `PrimaryCanvasGroup#addToken`. */
   static initialize(): void;
@@ -33,25 +44,35 @@ declare class TokenRing {
   /**
    * Get the UVs array for a given texture name and scale correction.
    * @param name              - Name of the texture we want to get UVs.
-   * @param scaleCorrection   - The scale correction applied to UVs. @defaultValue `1`
-   * @remarks scaleCorrection accepts undefined due to default value,
-   * but scaleCorrection is not checked against null in function body.
+   * @param scaleCorrection   - The scale correction applied to UVs. (default: `1`)
    */
+  // scaleCorrection: not null (parameter default only, casting to 0 produces nonsense)
   static getTextureUVs(name: string, scaleCorrection?: number): Float32Array;
 
   /**
    * Get ring and background names for a given size.
    * @param size  - The size to match (grid size dimension)
+   * @remarks `size` is in units of grid _spaces_, the core rings provide spritesheet frames for `0.5`, `1`, `2`, `3`, and `4`,
+   * and the value core passes in its only call is `Math.min(this.token.document.width ?? 1, this.token.document.height ?? 1)`.
+   * Values between provided sizes will use the closest available size provided.
    */
-  static getRingDataBySize(size: number): TokenRing.RingDataBySizeReturnType;
+  static getRingDataBySize(size: number): TokenRing.RingData;
 
-  ringName: string;
+  /**
+   * @remarks Not initialized to a value, this gets set in {@link TokenRing.configureSize | TokenRing.configureSize`}.
+   * After initialization (`ready`), this will only be `undefined` if the current spritesheet provides no frames
+   */
+  ringName: TokenRing.RingData["ringName"];
 
-  bkgName: string;
+  /**
+   * @remarks Not initialized to a value, this gets set in {@link TokenRing.configureSize | `TokenRing.configureSize`}.
+   * After initialization (`ready`), this will only be `undefined` if the current spritesheet provides no frames
+   */
+  bkgName: TokenRing.RingData["bkgName"];
 
-  ringUVs: Float32Array;
+  ringUVs: InitializedOn<Float32Array, "ready", undefined>;
 
-  bkgUVs: Float32Array;
+  bkgUVs: InitializedOn<Float32Array, "ready", undefined>;
 
   /**
    * Little endian format =\> BBGGRR
@@ -66,19 +87,20 @@ declare class TokenRing {
   bkgColorLittleEndian: number;
 
   /**
-   * Cannot be undefined as core explicitly checks for null.
    * @defaultValue `null`
+   * @remarks Cannot be `undefined` as core explicitly checks for `null`.
    */
-  defaultRingColorLittleEndian: number | null;
+  defaultRingColorLittleEndian: TokenRing.RingData["defaultRingColorLittleEndian"];
 
   /**
-   * Cannot be undefined as core explicitly checks for null.
    * @defaultValue `null`
+   * @remarks Cannot be `undefined` as core explicitly checks for `null`.
    */
-  defaultBackgroundColorLittleEndian: number | null;
+  defaultBackgroundColorLittleEndian: TokenRing.RingData["defaultBackgroundColorLittleEndian"];
 
   /**
    * @defaultValue `0`
+   * @remarks A bitmask of {@link TokenRing.Effects | `effects`}
    */
   effects: number;
 
@@ -100,23 +122,31 @@ declare class TokenRing {
   /**
    * @defaultValue `1`
    */
-  subjectScaleAdjustment: number;
+  subjectScaleAdjustment: TokenRing.RingData["subjectScaleAdjustment"];
 
   /**
    * @defaultValue `1`
    */
   textureScaleAdjustment: number;
 
-  colorBand: TokenRing.RingColorBand;
+  /**
+   * @remarks Not initialized to a value, this gets set in {@link TokenRing.configureSize | `configureSize`}.
+   * After initialization (`ready`), this will only be `undefined` if the current spritesheet provides no frames
+   */
+  colorBand: TokenRing.RingData["colorBand"];
 
-  /** Reference to the token that should be animated */
-  get token(): InitializedOn<Token.ConfiguredInstance, "init">;
+  /**
+   * Reference to the token that should be animated
+   * @remarks This getter is the return of calling {@link WeakRef.deref | `deref`} on the stored {@link WeakRef | `WeakRef`}
+   * of the Token passed at construction; If the Token has been garbage collected, will return undefined.
+   */
+  get token(): Token.ConfiguredInstance | undefined;
 
   /**
    * Configure the sprite mesh.
    * @param mesh  - The mesh to which TokenRing functionality is configured.
    */
-  configure(mesh?: PrimarySpriteMesh): void;
+  configure(mesh: PrimarySpriteMesh): void;
 
   /** Clear configuration pertaining to token ring from the mesh. */
   clear(): void;
@@ -130,15 +160,18 @@ declare class TokenRing {
   /**
    * Flash the ring briefly with a certain color.
    * @param color             - Color to flash.
-   * @param animationOptions  - Options to customize the animation. @defaultValue `{}`
+   * @param animationOptions  - Options to customize the animation. (default: `{}`)
+   * @remarks Only returns `Promise<void>` if `color` is `NaN`ish
    */
-  flashColor(Color: Color, animationOptions: CanvasAnimationOptions): Promise<boolean | void>;
+  // animationOptions: `null` allowed because it's used as the 2nd argument in a `mergeObject` before being passed along
+  flashColor(color: Color, animationOptions?: TokenRing.FlashColorOptions | null): Promise<boolean | void>;
 
   /**
    * Create an easing function that spikes in the center. Ideal duration is around 1600ms.
-   * @param spikePct  - Position on [0,1] where the spike occurs. @defaultValue `0.5`
+   * @param spikePct  - Position on [0,1] where the spike occurs. (default: `0.5`)
    */
-  static createSpikeEasing(spikePct?: number): (t: number) => number;
+  // spikePct: not null (used as divisor)
+  static createSpikeEasing(spikePct?: number): CanvasAnimation.EasingFunction;
 
   /**
    * Easing function that produces two peaks before returning to the original value. Ideal duration is around 500ms.
@@ -150,43 +183,103 @@ declare class TokenRing {
   /**
    * To avoid breaking dnd5e.
    * @deprecated since v12
+   * @remarks No deprecation warning or end of deprecation period provided, method body completely empty
    */
   configureMesh(): void;
 
   /**
    * To avoid breaking dnd5e.
    * @deprecated since v12
+   * @remarks No deprecation warning or end of deprecation period provided, method body completely empty
    */
   configureNames(): void;
 }
 
 declare namespace TokenRing {
-  type SampleShaderClass = CONFIG["Token"]["ring"]["shaderClass"];
+  interface Any extends AnyTokenRing {}
+  type AnyConstructor = typeof AnyTokenRing;
+
+  /** @remarks Overrides for default values */
+  interface FlashColorOptions extends CanvasAnimationOptions {
+    /**
+     * @defaultValue `1600`
+     * @remarks Can't be `null` because it only has a parameter default, and is used as a divisor in `CanvasAnimation.#animateFrame`
+     */
+    duration?: number;
+
+    /** @defaultValue `PIXI.UPDATE_PRIORITY.HIGH` */
+    priority?: PIXI.UPDATE_PRIORITY | null | undefined;
+
+    /** @defaultValue `TokenRing.createSpikeEasing(0.15)` */
+    easing?: CanvasAnimation.EasingFunction | null | undefined;
+  }
 
-  interface RingDataBySizeReturnType {
-    bkgName: string;
-    ringName: string;
-    colorBand: TokenRing.RingColorBand;
+  interface TextureData {
+    UVs: Float32Array;
+    center: { x: number; y: number };
+  }
+
+  /**
+   * @remarks {@link TokenRing.configureSize | `configureSize`} effectively calls `Object.assign(this, RingData)`
+   */
+  interface RingData {
+    ringName: string | undefined;
+
+    bkgName: string | undefined;
+
+    colorBand: ColorBand | undefined;
+
+    /**
+     * @remarks This property comes from the spritesheet JSON and is included with the frame entries in the `##ringData`
+     * private array, but is stripped out of the return of {@link TokenRing.getRingDataBySize | `getRingDataBySize`},
+     * and thus never gets assigned as a property to the `TokenRing` instance in {@link TokenRing.configureSize | `configureSize`}
+     */
+    gridTarget?: number;
+
+    defaultRingColorLittleEndian: number | null;
+
+    defaultBackgroundColorLittleEndian: number | null;
+
+    subjectScaleAdjustment: number | null;
   }
 
   /** The start and end radii of the token ring color band. */
-  interface RingColorBand {
-    /** The starting normalized radius of the token ring color band. */
+  interface ColorBand {
+    /**
+     * The starting normalized radius of the token ring color band.
+     * @defaultValue `0.59`
+     * @remarks Default only applies if spritesheet frame omits `colorBand` entirely
+     */
     startRadius: number;
 
-    /** The ending normalized radius of the token ring color band. */
+    /**
+     * The ending normalized radius of the token ring color band.
+     * @defaultValue `0.7225`
+     * @remarks Default only applies if spritesheet frame omits `colorBand` entirely
+     */
     endRadius: number;
   }
 
-  interface Effects
-    extends Readonly<{
-      DISABLED: 0x00;
-      ENABLED: 0x01;
-      RING_PULSE: 0x02;
-      RING_GRADIENT: 0x04;
-      BKG_WAVE: 0x08;
-      INVISIBILITY: 0x10; // or spectral pulse effect
-    }> {}
+  type EFFECTS = Brand<number, "TokenRing.effects">;
+
+  interface Effects {
+    readonly DISABLED: 0x00 & EFFECTS;
+
+    readonly ENABLED: 0x01 & EFFECTS;
+
+    readonly RING_PULSE: 0x02 & EFFECTS;
+
+    readonly RING_GRADIENT: 0x04 & EFFECTS;
+
+    readonly BKG_WAVE: 0x08 & EFFECTS;
+
+    /** @remarks Foundry comments "or spectral pulse effect" */
+    readonly INVISIBILITY: 0x10 & EFFECTS;
+  }
+}
+
+declare abstract class AnyTokenRing extends TokenRing {
+  constructor(arg0: never, ...args: never[]);
 }
 
 export default TokenRing;
diff --git a/src/foundry/client/config.d.mts b/src/foundry/client/config.d.mts
index adb2a3c53..6488ac56d 100644
--- a/src/foundry/client/config.d.mts
+++ b/src/foundry/client/config.d.mts
@@ -2639,7 +2639,8 @@ declare global {
 
       /**
        * @defaultValue `foundry.canvas.tokens.TokenRingConfig`
-       * @remarks `"ring property is initialized in foundry.canvas.tokens.TokenRingConfig.initialize"`
+       * @remarks Foundry leaves a comment claiming `"ring property is initialized in foundry.canvas.tokens.TokenRingConfig.initialize"`,
+       * and while that's true, it's _instantiated_ here in `config.js` via defineProperty (`enumerable: true`)
        */
       readonly ring: foundry.canvas.tokens.TokenRingConfig;
     };
diff --git a/src/foundry/client/pixi/core/interaction/canvas-animation.d.mts b/src/foundry/client/pixi/core/interaction/canvas-animation.d.mts
index a57595980..f5f35bd74 100644
--- a/src/foundry/client/pixi/core/interaction/canvas-animation.d.mts
+++ b/src/foundry/client/pixi/core/interaction/canvas-animation.d.mts
@@ -180,7 +180,7 @@ declare global {
     /**
      * A duration in milliseconds over which the animation should occur
      * @defaultValue `1000`
-     * @remarks Can't be `null` because it only has a parameter default, and used as a divisor in `CanvasAnimation.#animateFrame`
+     * @remarks Can't be `null` because it only has a parameter default, and is used as a divisor in `CanvasAnimation.#animateFrame`
      */
     duration?: number | undefined;
   }
diff --git a/src/foundry/common/data/data.d.mts b/src/foundry/common/data/data.d.mts
index b482bbe08..8bf123858 100644
--- a/src/foundry/common/data/data.d.mts
+++ b/src/foundry/common/data/data.d.mts
@@ -2,7 +2,7 @@ import type { DatabaseBackend } from "../abstract/module.d.mts";
 import type { DataModel } from "../abstract/data.d.mts";
 import type { fields } from "./module.d.mts";
 import type * as documents from "../documents/_module.d.mts";
-import type { AnyMutableObject, EmptyObject, ToMethod, ValueOf } from "fvtt-types/utils";
+import type { AnyMutableObject, EmptyObject, RemoveIndexSignatures, ToMethod, ValueOf } from "fvtt-types/utils";
 import type { FilePathField } from "./fields.d.mts";
 
 type DataSchema = foundry.data.fields.DataSchema;
@@ -237,17 +237,21 @@ declare class ShapeData extends DataModel<ShapeData.Schema> {
 }
 
 declare namespace BaseShapeData {
-  interface Schema extends DataSchema {
+  interface Schema<ShapeType extends ShapeTypes = ShapeTypes> extends DataSchema {
     /**
      * The type of shape, a value in BaseShapeData.TYPES.
      * @defaultValue `this.TYPE`
+     * @remarks `this.TYPE` is `""` in `BaseShapeData`, and must be defined by subclasses
      */
     type: fields.StringField<{
       required: true;
       blank: false;
-      initial: string;
-      validate: (value: string) => boolean;
-      validationError: `must be equal to "${string}"`;
+      initial: ShapeType;
+      validate: (value: unknown) => value is ShapeType;
+      // TODO: The following `choices` does not exist in Foundry, it's a type hack to get this field to report as the only valid value it can have
+      // TODO: The validation function enough might be able to be made to sufficiently limit the value
+      choices: [ShapeType];
+      validationError: `must be equal to "${ShapeType}"`;
     }>;
 
     /**
@@ -257,6 +261,8 @@ declare namespace BaseShapeData {
     hole: fields.BooleanField;
   }
 
+  type ShapeTypes = keyof RemoveIndexSignatures<BaseShapeData.Types>;
+
   interface Types extends foundry.data.fields.TypedSchemaField.Types {
     rectangle: typeof RectangleShapeData;
     circle: typeof CircleShapeData;
@@ -268,7 +274,9 @@ declare namespace BaseShapeData {
 /**
  * A data model intended to be used as an inner EmbeddedDataField which defines a geometric shape.
  */
-declare abstract class BaseShapeData extends DataModel<BaseShapeData.Schema> {
+declare abstract class BaseShapeData<
+  ShapeSchema extends BaseShapeData.Schema = BaseShapeData.Schema,
+> extends DataModel<ShapeSchema> {
   /**
    * The possible shape types.
    */
@@ -285,7 +293,7 @@ declare abstract class BaseShapeData extends DataModel<BaseShapeData.Schema> {
 }
 
 declare namespace RectangleShapeData {
-  interface Schema extends BaseShapeData.Schema {
+  interface Schema extends BaseShapeData.Schema<"rectangle"> {
     /**
      * The top-left x-coordinate in pixels before rotation.
      * @defaultValue `undefined`
@@ -321,17 +329,14 @@ declare namespace RectangleShapeData {
 /**
  * The data model for a rectangular shape.
  */
-declare class RectangleShapeData extends BaseShapeData {
-  /**
-   * @defaultValue `"rectangle"`
-   */
-  static override TYPE: string;
+declare class RectangleShapeData extends BaseShapeData<RectangleShapeData.Schema> {
+  static override TYPE: "rectangle";
 
   static override defineSchema(): RectangleShapeData.Schema;
 }
 
 declare namespace CircleShapeData {
-  interface Schema extends BaseShapeData.Schema {
+  interface Schema extends BaseShapeData.Schema<"circle"> {
     /**
      * The x-coordinate of the center point in pixels.
      * @defaultValue `undefined`
@@ -355,17 +360,14 @@ declare namespace CircleShapeData {
 /**
  * The data model for a circle shape.
  */
-declare class CircleShapeData extends BaseShapeData {
-  /**
-   * @defaultValue `"circle"`
-   */
-  static override TYPE: string;
+declare class CircleShapeData extends BaseShapeData<CircleShapeData.Schema> {
+  static override TYPE: "circle";
 
   static override defineSchema(): CircleShapeData.Schema;
 }
 
 declare namespace EllipseShapeData {
-  interface Schema extends BaseShapeData.Schema {
+  interface Schema extends BaseShapeData.Schema<"ellipse"> {
     /**
      * The x-coordinate of the center point in pixels.
      * @defaultValue `undefined`
@@ -401,17 +403,14 @@ declare namespace EllipseShapeData {
 /**
  * The data model for an ellipse shape.
  */
-declare class EllipseShapeData extends BaseShapeData {
-  /**
-   * @defaultValue `"ellipse"`
-   */
-  static override TYPE: string;
+declare class EllipseShapeData extends BaseShapeData<EllipseShapeData.Schema> {
+  static override TYPE: "ellipse";
 
   static override defineSchema(): EllipseShapeData.Schema;
 }
 
 declare namespace PolygonShapeData {
-  interface Schema extends BaseShapeData.Schema {
+  interface Schema extends BaseShapeData.Schema<"polygon"> {
     /**
      * The points of the polygon ([x0, y0, x1, y1, ...]).
      * The polygon must not be self-intersecting.
@@ -427,11 +426,8 @@ declare namespace PolygonShapeData {
 /**
  * The data model for a polygon shape.
  */
-declare class PolygonShapeData extends BaseShapeData {
-  /**
-   * @defaultValue `"polygon"`
-   */
-  static override TYPE: string;
+declare class PolygonShapeData extends BaseShapeData<PolygonShapeData.Schema> {
+  static override TYPE: "polygon";
 
   static override defineSchema(): PolygonShapeData.Schema;
 }


Test patch:
diff --git a/tests/foundry/client-esm/canvas/regions/geometry.test-d.ts b/tests/foundry/client-esm/canvas/regions/geometry.test-d.ts
new file mode 100644
index 000000000..58bc1929e
--- /dev/null
+++ b/tests/foundry/client-esm/canvas/regions/geometry.test-d.ts
@@ -0,0 +1,8 @@
+import { expectTypeOf } from "vitest";
+
+declare const someRegion: Region.ConfiguredInstance;
+const myRG = new foundry.canvas.regions.RegionGeometry(someRegion);
+
+expectTypeOf(myRG.region).toEqualTypeOf<Region.ConfiguredInstance>();
+expectTypeOf(myRG["_clearBuffers"]()).toBeVoid();
+expectTypeOf(myRG["_updateBuffers"]()).toBeVoid();
diff --git a/tests/foundry/client-esm/canvas/regions/mesh.test-d.ts b/tests/foundry/client-esm/canvas/regions/mesh.test-d.ts
new file mode 100644
index 000000000..f8d028c93
--- /dev/null
+++ b/tests/foundry/client-esm/canvas/regions/mesh.test-d.ts
@@ -0,0 +1,27 @@
+import { expectTypeOf } from "vitest";
+
+declare const someRegion: Region.ConfiguredInstance;
+
+const myRM = new foundry.canvas.regions.RegionMesh(someRegion, RegionShader);
+
+expectTypeOf(myRM.region).toEqualTypeOf<Region.ConfiguredInstance>();
+expectTypeOf(myRM.shader).toEqualTypeOf<AbstractBaseShader>();
+
+expectTypeOf(myRM.blendMode).toMatchTypeOf<PIXI.BLEND_MODES>();
+expectTypeOf((myRM.blendMode = PIXI.BLEND_MODES.DST_ATOP)).toMatchTypeOf<PIXI.BLEND_MODES>();
+
+expectTypeOf(myRM.tint).toBeNumber();
+expectTypeOf((myRM.tint = 0xabcedf)).toBeNumber();
+
+expectTypeOf(myRM["_tintColor"]).toEqualTypeOf<PIXI.Color>();
+expectTypeOf(myRM["_cachedTint"]).toEqualTypeOf<Color.RGBAColorVector>();
+expectTypeOf(myRM["_tintAlphaDirty"]).toBeBoolean();
+
+expectTypeOf(myRM.setShaderClass(PulseColorationShader)).toBeVoid();
+expectTypeOf(myRM.updateTransform()).toBeVoid();
+
+declare const someRenderer: PIXI.Renderer;
+expectTypeOf(myRM["_render"](someRenderer)).toBeVoid();
+expectTypeOf(myRM["_calculateBounds"]()).toBeVoid();
+
+expectTypeOf(myRM.containsPoint({ x: 50, y: 50 })).toBeBoolean();
diff --git a/tests/foundry/client-esm/canvas/regions/polygon-tree.test-d.ts b/tests/foundry/client-esm/canvas/regions/polygon-tree.test-d.ts
new file mode 100644
index 000000000..ae01b00cb
--- /dev/null
+++ b/tests/foundry/client-esm/canvas/regions/polygon-tree.test-d.ts
@@ -0,0 +1,34 @@
+import { expectTypeOf } from "vitest";
+import type { ValueOf } from "../../../../../src/utils/index.d.mts";
+import RegionPolygonTree = foundry.canvas.regions.RegionPolygonTree;
+
+declare const somePath: ClipperLib.Path;
+declare const somePolyTree: ClipperLib.PolyTree;
+declare const someOtherRPT: RegionPolygonTree;
+// RPTN is not actually exported so we have to dig for it
+type RegionPolygonTreeNode = ValueOf<RegionPolygonTree["children"]>;
+
+expectTypeOf(RegionPolygonTree["_fromClipperPath"](somePath, null)).toEqualTypeOf<RegionPolygonTreeNode>();
+expectTypeOf(RegionPolygonTree["_fromClipperPath"](somePath, someOtherRPT)).toEqualTypeOf<RegionPolygonTreeNode>();
+expectTypeOf(RegionPolygonTree["_fromClipperPolyTree"](somePolyTree)).toEqualTypeOf<RegionPolygonTree>();
+
+const myRPT = new RegionPolygonTree();
+
+expectTypeOf(myRPT.parent).toEqualTypeOf<RegionPolygonTreeNode | null>();
+
+// this is truly redundant given how we had to extract it above
+expectTypeOf(myRPT.children).toEqualTypeOf<RegionPolygonTreeNode[]>();
+
+expectTypeOf(myRPT.depth).toBeNumber();
+expectTypeOf(myRPT.isHole).toBeBoolean();
+expectTypeOf(myRPT.clipperPath).toEqualTypeOf<ClipperLib.Path | null>();
+expectTypeOf(myRPT.polygon).toEqualTypeOf<PIXI.Polygon | null>();
+expectTypeOf(myRPT.points).toEqualTypeOf<number[] | null>();
+expectTypeOf(myRPT.bounds).toEqualTypeOf<PIXI.Rectangle | null>();
+
+for (const node of myRPT) {
+  expectTypeOf(node).toEqualTypeOf<RegionPolygonTreeNode>();
+}
+
+expectTypeOf(myRPT.testPoint({ x: 5, y: 10 })).toBeBoolean();
+expectTypeOf(myRPT.testCircle({ x: 500, y: 7 }, 500)).toEqualTypeOf<-1 | 0 | 1>();
diff --git a/tests/foundry/client-esm/canvas/regions/shape.test-d.ts b/tests/foundry/client-esm/canvas/regions/shape.test-d.ts
new file mode 100644
index 000000000..7654449e4
--- /dev/null
+++ b/tests/foundry/client-esm/canvas/regions/shape.test-d.ts
@@ -0,0 +1,60 @@
+import { expectTypeOf } from "vitest";
+import type {
+  CircleShapeData,
+  EllipseShapeData,
+  PolygonShapeData,
+  RectangleShapeData,
+} from "../../../../../src/foundry/common/data/data.d.mts";
+import RegionShape = foundry.canvas.regions.RegionShape;
+
+declare const cData: CircleShapeData;
+declare const eData: EllipseShapeData;
+declare const rData: RectangleShapeData;
+declare const pData: PolygonShapeData;
+declare const someGraphics: PIXI.Graphics;
+
+const rCircle = RegionShape.create(cData);
+const rEllipse = RegionShape.create(eData);
+const rRect = RegionShape.create(rData);
+const rPoly = RegionShape.create(pData);
+
+expectTypeOf(rCircle.data.type).toEqualTypeOf<"circle">();
+expectTypeOf(rCircle.data.x).toBeNumber();
+expectTypeOf(rCircle.data.y).toBeNumber();
+expectTypeOf(rCircle.data.radius).toBeNumber();
+expectTypeOf(rCircle.isHole).toBeBoolean();
+expectTypeOf(rCircle.clipperPaths).toEqualTypeOf<ClipperLib.Paths>();
+expectTypeOf(rCircle.clipperPolyTree).toEqualTypeOf<ClipperLib.PolyTree>();
+expectTypeOf(rCircle["_createClipperPolyTree"]()).toEqualTypeOf<ClipperLib.Path>();
+expectTypeOf(rCircle["_drawShape"](someGraphics)).toBeVoid();
+
+expectTypeOf(rEllipse.data.type).toEqualTypeOf<"ellipse">();
+expectTypeOf(rEllipse.data.x).toBeNumber();
+expectTypeOf(rEllipse.data.y).toBeNumber();
+expectTypeOf(rEllipse.data.radiusX).toBeNumber();
+expectTypeOf(rEllipse.data.radiusY).toBeNumber();
+expectTypeOf(rEllipse.data.rotation).toBeNumber();
+expectTypeOf(rEllipse.isHole).toBeBoolean();
+expectTypeOf(rEllipse.clipperPaths).toEqualTypeOf<ClipperLib.Paths>();
+expectTypeOf(rEllipse.clipperPolyTree).toEqualTypeOf<ClipperLib.PolyTree>();
+expectTypeOf(rEllipse["_createClipperPolyTree"]()).toEqualTypeOf<ClipperLib.Path>();
+expectTypeOf(rEllipse["_drawShape"](someGraphics)).toBeVoid();
+
+expectTypeOf(rPoly.data.type).toEqualTypeOf<"polygon">();
+expectTypeOf(rPoly.data.points).toEqualTypeOf<number[]>();
+expectTypeOf(rPoly.clipperPaths).toEqualTypeOf<ClipperLib.Paths>();
+expectTypeOf(rPoly.clipperPolyTree).toEqualTypeOf<ClipperLib.PolyTree>();
+expectTypeOf(rPoly["_createClipperPolyTree"]()).toEqualTypeOf<ClipperLib.Path>();
+expectTypeOf(rPoly["_drawShape"](someGraphics)).toBeVoid();
+
+expectTypeOf(rRect.data.type).toEqualTypeOf<"rectangle">();
+expectTypeOf(rRect.data.x).toBeNumber();
+expectTypeOf(rRect.data.y).toBeNumber();
+expectTypeOf(rRect.data.width).toBeNumber();
+expectTypeOf(rRect.data.height).toBeNumber();
+expectTypeOf(rRect.data.rotation).toBeNumber();
+expectTypeOf(rRect.isHole).toBeBoolean();
+expectTypeOf(rRect.clipperPaths).toEqualTypeOf<ClipperLib.Paths>();
+expectTypeOf(rRect.clipperPolyTree).toEqualTypeOf<ClipperLib.PolyTree>();
+expectTypeOf(rRect["_createClipperPolyTree"]()).toEqualTypeOf<ClipperLib.Path>();
+expectTypeOf(rRect["_drawShape"](someGraphics)).toBeVoid();
diff --git a/tests/foundry/client-esm/canvas/scene-manager.test-d.ts b/tests/foundry/client-esm/canvas/scene-manager.test-d.ts
new file mode 100644
index 000000000..d92917617
--- /dev/null
+++ b/tests/foundry/client-esm/canvas/scene-manager.test-d.ts
@@ -0,0 +1,17 @@
+import { expectTypeOf } from "vitest";
+import SceneManager = foundry.canvas.SceneManager;
+
+declare const someScene: Scene.ConfiguredInstance;
+const mySM = new SceneManager(someScene);
+
+expectTypeOf(mySM.scene).toEqualTypeOf<Scene.ConfiguredInstance>();
+expectTypeOf(mySM["_onInit"]()).toEqualTypeOf<Promise<void>>();
+expectTypeOf(mySM["_onDraw"]()).toEqualTypeOf<Promise<void>>();
+expectTypeOf(mySM["_onReady"]()).toEqualTypeOf<Promise<void>>();
+expectTypeOf(mySM["_onTearDown"]()).toEqualTypeOf<Promise<void>>();
+expectTypeOf(mySM["_registerHooks"]()).toBeVoid();
+expectTypeOf(mySM["_deactivateHooks"]()).toBeVoid();
+
+expectTypeOf(mySM.registerHooks("foo", () => "foo!")).toBeVoid();
+expectTypeOf(mySM.registerHooks("foo", (pt: number) => pt * 2)).toBeVoid();
+expectTypeOf(mySM.registerHooks("foo", (name: string) => name.length > 4)).toBeVoid();
diff --git a/tests/foundry/client-esm/canvas/smaa/blend.test-d.ts b/tests/foundry/client-esm/canvas/smaa/blend.test-d.ts
new file mode 100644
index 000000000..66087b238
--- /dev/null
+++ b/tests/foundry/client-esm/canvas/smaa/blend.test-d.ts
@@ -0,0 +1,2 @@
+// `SMAANeighborhoodBlendingFilter` is only imported in `smaa.mjs`, is only assigned to a private property of `SMAAFilter`, and never gets re-exported, so it cannot currently be tested.
+// This is fine, as it has no testable alterations to its parent class in any case.
diff --git a/tests/foundry/client-esm/canvas/smaa/edges.test-d.ts b/tests/foundry/client-esm/canvas/smaa/edges.test-d.ts
new file mode 100644
index 000000000..35362feb9
--- /dev/null
+++ b/tests/foundry/client-esm/canvas/smaa/edges.test-d.ts
@@ -0,0 +1,2 @@
+// `SMAAEdgeDetectionFilter` is only imported in `smaa.mjs`, is only assigned to a private property of `SMAAFilter`, and never gets re-exported, so it cannot currently be tested.
+// It's only testable alteration to its parent class is the constructor interface
diff --git a/tests/foundry/client-esm/canvas/smaa/smaa.mjs.test-d.ts b/tests/foundry/client-esm/canvas/smaa/smaa.mjs.test-d.ts
deleted file mode 100644
index 9e9c85909..000000000
--- a/tests/foundry/client-esm/canvas/smaa/smaa.mjs.test-d.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { BaseRenderTexture, CLEAR_MODES, FilterState, FilterSystem, RenderTexture, Renderer } from "pixi.js";
-import { expectTypeOf } from "vitest";
-
-const f = new foundry.canvas.SMAAFilter();
-const r = new Renderer();
-const b = new BaseRenderTexture();
-
-expectTypeOf(
-  f.apply(new FilterSystem(r), new RenderTexture(b), new RenderTexture(b), CLEAR_MODES.AUTO, new FilterState()),
-).toMatchTypeOf<void>();
diff --git a/tests/foundry/client-esm/canvas/smaa/smaa.test-d.ts b/tests/foundry/client-esm/canvas/smaa/smaa.test-d.ts
new file mode 100644
index 000000000..61cb71cca
--- /dev/null
+++ b/tests/foundry/client-esm/canvas/smaa/smaa.test-d.ts
@@ -0,0 +1,32 @@
+import { expectTypeOf } from "vitest";
+import SMAAFilter = foundry.canvas.SMAAFilter;
+
+expectTypeOf(SMAAFilter.PRESETS).toMatchTypeOf<Record<keyof SMAAFilter.Presets, SMAAFilter.PRESETS>>();
+
+let smaaFilter = new SMAAFilter();
+smaaFilter = new SMAAFilter({});
+smaaFilter = new SMAAFilter({
+  threshold: 0.07,
+  cornerRounding: 32,
+  disableCornerDetection: true,
+  disableDiagDetection: false,
+  localContrastAdaptionFactor: 7,
+  maxSearchSteps: 12,
+  maxSearchStepsDiag: 6,
+});
+// effectively testing runtime, as core never passes anything
+smaaFilter = new SMAAFilter({
+  threshold: undefined,
+  cornerRounding: undefined,
+  disableCornerDetection: undefined,
+  disableDiagDetection: undefined,
+  localContrastAdaptionFactor: undefined,
+  maxSearchSteps: undefined,
+  maxSearchStepsDiag: undefined,
+});
+
+declare const someManager: PIXI.FilterSystem;
+declare const someRT: PIXI.RenderTexture;
+declare const someState: PIXI.FilterState;
+
+expectTypeOf(smaaFilter.apply(someManager, someRT, someRT, PIXI.CLEAR_MODES.BLIT, someState)).toBeVoid();
diff --git a/tests/foundry/client-esm/canvas/smaa/weights.test-d.ts b/tests/foundry/client-esm/canvas/smaa/weights.test-d.ts
new file mode 100644
index 000000000..992b852fe
--- /dev/null
+++ b/tests/foundry/client-esm/canvas/smaa/weights.test-d.ts
@@ -0,0 +1,2 @@
+// `SMAABWeightCalculationFilter` is only imported in `smaa.mjs`, is only assigned to a private property of `SMAAFilter`, and never gets re-exported, so it cannot currently be tested.
+// It's only testable alteration to its parent class is the constructor interface
diff --git a/tests/foundry/client-esm/canvas/tokens/ring-config.test-d.ts b/tests/foundry/client-esm/canvas/tokens/ring-config.test-d.ts
new file mode 100644
index 000000000..5e3880e6b
--- /dev/null
+++ b/tests/foundry/client-esm/canvas/tokens/ring-config.test-d.ts
@@ -0,0 +1,47 @@
+import { expectTypeOf } from "vitest";
+import TokenRingConfig = foundry.canvas.tokens.TokenRingConfig;
+import TokenRing = foundry.canvas.tokens.TokenRing;
+import DynamicRingData = foundry.canvas.tokens.DynamicRingData;
+
+if (game.ready) {
+  expectTypeOf(TokenRingConfig.CORE_TOKEN_RINGS).toEqualTypeOf<TokenRingConfig.SourceCoreRings>;
+} else {
+  // @ts-expect-error This would pass if `game.ready` narrowing worked on things other than `game` itself
+  expectTypeOf(TokenRingConfig.CORE_TOKEN_RINGS).toEqualTypeOf<TokenRingConfig.InitialCoreRings>();
+}
+
+expectTypeOf(TokenRingConfig.CORE_TOKEN_RINGS_FIT_MODES).toEqualTypeOf<TokenRingConfig.CoreTokenRingsFitModes>();
+expectTypeOf(TokenRingConfig.initialize()).toBeVoid();
+expectTypeOf(TokenRingConfig.registerSettings()).toBeVoid();
+
+const myTRC = new TokenRingConfig();
+
+expectTypeOf(myTRC.subjectPaths).toEqualTypeOf<Record<string, string>>();
+expectTypeOf(myTRC.debugColorBands).toBeBoolean();
+
+expectTypeOf(myTRC.ringClass).toEqualTypeOf<typeof TokenRing>();
+declare class MyTokenRing extends TokenRing {
+  #differentClass: true;
+}
+expectTypeOf((myTRC.ringClass = MyTokenRing)).toEqualTypeOf<typeof MyTokenRing>();
+
+expectTypeOf(myTRC.effects).toEqualTypeOf<Record<string, string>>();
+expectTypeOf(myTRC.spritesheet).toEqualTypeOf<string | null>();
+
+expectTypeOf(myTRC.shaderClass).toEqualTypeOf<PrimaryBaseSamplerShader.AnyConstructor>();
+expectTypeOf((myTRC.shaderClass = TokenRingSamplerShader)).toEqualTypeOf<typeof TokenRingSamplerShader>();
+
+expectTypeOf(myTRC.label).toEqualTypeOf<string | undefined>();
+expectTypeOf(myTRC.id).toEqualTypeOf<string | undefined>();
+expectTypeOf(myTRC.isGridFitMode).toBeBoolean();
+
+declare const someConfig: DynamicRingData;
+expectTypeOf(myTRC.addConfig("someConfig", someConfig)).toBeVoid();
+expectTypeOf(myTRC.getConfig("someConfig")).toEqualTypeOf<DynamicRingData>();
+expectTypeOf(myTRC.useConfig("someConfig")).toBeBoolean();
+
+expectTypeOf(myTRC.configIDs).toEqualTypeOf<string[]>();
+expectTypeOf(myTRC.configLabels).toEqualTypeOf<Record<string, string>>();
+
+// deprecated since v12, until v14
+expectTypeOf(myTRC.configNames).toEqualTypeOf<string[]>();
diff --git a/tests/foundry/client-esm/canvas/tokens/ring-data.test-d.ts b/tests/foundry/client-esm/canvas/tokens/ring-data.test-d.ts
index caf02af32..62be82996 100644
--- a/tests/foundry/client-esm/canvas/tokens/ring-data.test-d.ts
+++ b/tests/foundry/client-esm/canvas/tokens/ring-data.test-d.ts
@@ -1,12 +1,39 @@
 import { expectTypeOf } from "vitest";
-import type DynamicRingData from "../../../../../src/foundry/client-esm/canvas/tokens/ring-data.d.mts";
-import type TokenRing from "../../../../../src/foundry/client-esm/canvas/tokens/ring.d.mts";
+import TokenRing = foundry.canvas.tokens.TokenRing;
+import DynamicRingData = foundry.canvas.tokens.DynamicRingData;
 
-declare const mySource: DynamicRingData;
+declare class MyTokenRing extends TokenRing {
+  #differentClass: true;
+}
 
-expectTypeOf(mySource.id).toEqualTypeOf<string | undefined>();
-expectTypeOf(mySource.label).toEqualTypeOf<string | undefined>();
-expectTypeOf(mySource.spritesheet).toEqualTypeOf<string | null>();
-expectTypeOf(mySource.effects).toEqualTypeOf<Record<string, string>>();
-expectTypeOf(mySource.framework.ringClass).toEqualTypeOf<typeof TokenRing>();
-expectTypeOf(mySource.framework.shaderClass).toEqualTypeOf<typeof PrimaryBaseSamplerShader>();
+declare class MyTokenRingSamplerShader extends PrimaryBaseSamplerShader {
+  #differentClass: true;
+}
+
+let myRD = new DynamicRingData({});
+myRD = new DynamicRingData({
+  id: undefined,
+  label: undefined,
+  spritesheet: null,
+  effects: {},
+  framework: undefined,
+});
+myRD = new DynamicRingData({
+  id: "myRingConfig",
+  label: "MYSYSTEM.RingConfigs.myRingConfig.label",
+  spritesheet: "path/to/spritesheet.json",
+  effects: {
+    foo: "bar",
+  },
+  framework: {
+    ringClass: MyTokenRing,
+    shaderClass: MyTokenRingSamplerShader,
+  },
+});
+
+expectTypeOf(myRD.id).toEqualTypeOf<string | undefined>();
+expectTypeOf(myRD.label).toEqualTypeOf<string | undefined>();
+expectTypeOf(myRD.spritesheet).toEqualTypeOf<string | null>();
+expectTypeOf(myRD.effects).toEqualTypeOf<Record<string, string>>();
+expectTypeOf(myRD.framework.ringClass).toEqualTypeOf<typeof TokenRing>();
+expectTypeOf(myRD.framework.shaderClass).toEqualTypeOf<PrimaryBaseSamplerShader.AnyConstructor>();
diff --git a/tests/foundry/client-esm/canvas/tokens/ring.test-d.ts b/tests/foundry/client-esm/canvas/tokens/ring.test-d.ts
new file mode 100644
index 000000000..89737a282
--- /dev/null
+++ b/tests/foundry/client-esm/canvas/tokens/ring.test-d.ts
@@ -0,0 +1,80 @@
+import { expectTypeOf } from "vitest";
+
+import TokenRing = foundry.canvas.tokens.TokenRing;
+
+expectTypeOf(TokenRing.effects).toMatchTypeOf<Record<keyof TokenRing.Effects, TokenRing.EFFECTS>>();
+
+if (game.ready) {
+  expectTypeOf(TokenRing.initialized).toBeBoolean();
+  expectTypeOf(TokenRing.tokenRingSamplerShader).toEqualTypeOf<PrimaryBaseSamplerShader.AnyConstructor>();
+} else {
+  // @ts-expect-error This would pass if `game.ready` narrowing worked on things other than `game` itself
+  expectTypeOf(TokenRing.initialized).toBeNull();
+  // @ts-expect-error This would pass if `game.ready` narrowing worked on things other than `game` itself
+  expectTypeOf(TokenRing.tokenRingSamplerShader).toBeUndefined();
+}
+
+expectTypeOf(TokenRing.baseTexture).toEqualTypeOf<PIXI.BaseTexture | undefined>();
+expectTypeOf(TokenRing.texturesData).toEqualTypeOf<Record<string, TokenRing.TextureData> | undefined>();
+expectTypeOf(TokenRing.initialize()).toBeVoid();
+expectTypeOf(TokenRing.createAssetsUVs()).toBeVoid();
+
+expectTypeOf(TokenRing.getTextureUVs("foo")).toEqualTypeOf<Float32Array>();
+expectTypeOf(TokenRing.getTextureUVs("foo", 1.6)).toEqualTypeOf<Float32Array>();
+expectTypeOf(TokenRing.getRingDataBySize(3)).toEqualTypeOf<TokenRing.RingData>();
+
+expectTypeOf(TokenRing.createSpikeEasing()).toEqualTypeOf<CanvasAnimation.EasingFunction>();
+expectTypeOf(TokenRing.createSpikeEasing(0.72)).toEqualTypeOf<CanvasAnimation.EasingFunction>();
+
+expectTypeOf(TokenRing.easeTwoPeaks(0.34)).toBeNumber();
+expectTypeOf(TokenRing.easeTwoPeaks).toMatchTypeOf<CanvasAnimation.EasingFunction>();
+
+declare const someToken: Token.ConfiguredInstance;
+const myTR = new TokenRing(someToken);
+
+expectTypeOf(myTR.ringName).toEqualTypeOf<string | undefined>();
+expectTypeOf(myTR.bkgName).toEqualTypeOf<string | undefined>();
+
+if (game.ready) {
+  expectTypeOf(myTR.ringUVs).toEqualTypeOf<Float32Array>();
+  expectTypeOf(myTR.bkgUVs).toEqualTypeOf<Float32Array>();
+} else {
+  // @ts-expect-error This would pass if `game.ready` narrowing worked on things other than `game` itself
+  expectTypeOf(myTR.ringUVs).toBeUndefined();
+  // @ts-expect-error This would pass if `game.ready` narrowing worked on things other than `game` itself
+  expectTypeOf(myTR.bkgUVs).toBeUndefined();
+}
+
+expectTypeOf(myTR.ringColorLittleEndian).toBeNumber();
+expectTypeOf(myTR.bkgColorLittleEndian).toBeNumber();
+expectTypeOf(myTR.defaultRingColorLittleEndian).toEqualTypeOf<number | null>();
+expectTypeOf(myTR.defaultBackgroundColorLittleEndian).toEqualTypeOf<number | null>();
+expectTypeOf(myTR.effects).toBeNumber();
+expectTypeOf(myTR.scaleCorrection).toBeNumber();
+expectTypeOf(myTR.scaleAdjustmentX).toBeNumber();
+expectTypeOf(myTR.scaleAdjustmentY).toBeNumber();
+expectTypeOf(myTR.subjectScaleAdjustment).toEqualTypeOf<number | null>();
+expectTypeOf(myTR.colorBand).toEqualTypeOf<TokenRing.ColorBand | undefined>();
+expectTypeOf(myTR.token).toEqualTypeOf<Token.ConfiguredInstance | undefined>();
+
+expectTypeOf(myTR.configure(someToken.mesh)).toBeVoid();
+expectTypeOf(myTR.clear()).toBeVoid();
+expectTypeOf(myTR.configureSize()).toBeVoid();
+expectTypeOf(myTR.configureVisuals()).toBeVoid();
+
+declare const someColor: Color;
+declare const somePromise: Promise<void>;
+declare const someOnTickFunction: CanvasAnimation.OnTickFunction;
+expectTypeOf(myTR.flashColor(someColor)).toEqualTypeOf<Promise<boolean | void>>();
+expectTypeOf(myTR.flashColor(someColor, null)).toEqualTypeOf<Promise<boolean | void>>();
+expectTypeOf(
+  myTR.flashColor(someColor, {
+    context: someToken,
+    duration: 2000,
+    easing: TokenRing.easeTwoPeaks,
+    name: "foo",
+    wait: somePromise,
+    priority: (PIXI.UPDATE_PRIORITY.HIGH + 1) as PIXI.UPDATE_PRIORITY,
+    ontick: someOnTickFunction,
+  }),
+).toEqualTypeOf<Promise<boolean | void>>();