Repository: League-of-Foundry-Developers/foundry-vtt-types
Pull request #3045 (2025-01-28 22:41:46)

Another batch of tests
Another batch of tests

client-esm/applications/*
client-esm/audio
client-esm/canvas/edges

Also a few changes to source docs for cleanup and/or where I found things that didn't match foundry source


Patch:
diff --git a/src/foundry/client-esm/applications/apps/compendium-art-config.d.mts b/src/foundry/client-esm/applications/apps/compendium-art-config.d.mts
index 714910e80..5e13ef7e3 100644
--- a/src/foundry/client-esm/applications/apps/compendium-art-config.d.mts
+++ b/src/foundry/client-esm/applications/apps/compendium-art-config.d.mts
@@ -28,7 +28,6 @@ declare class CompendiumArtConfig<
   /*  Rendering                                   */
   /* -------------------------------------------- */
 
-  /** @override */
   override _prepareContext(_options: DeepPartial<ApplicationV2.RenderOptions>): Promise<RenderContext>;
 }
 
diff --git a/src/foundry/client-esm/applications/elements/document-tags.d.mts b/src/foundry/client-esm/applications/elements/document-tags.d.mts
index c67047442..3145dcb69 100644
--- a/src/foundry/client-esm/applications/elements/document-tags.d.mts
+++ b/src/foundry/client-esm/applications/elements/document-tags.d.mts
@@ -7,6 +7,8 @@ import type AbstractFormInputElement from "./form-element.d.mts";
 declare class HTMLDocumentTagsElement extends AbstractFormInputElement<Record<string, string> | string | string[]> {
   constructor();
 
+  static override tagName: "document-tags";
+
   protected _value: Record<string, string>;
 
   set type(value: string);
diff --git a/src/foundry/client-esm/applications/elements/multi-select.d.mts b/src/foundry/client-esm/applications/elements/multi-select.d.mts
index 6ec182792..28deed298 100644
--- a/src/foundry/client-esm/applications/elements/multi-select.d.mts
+++ b/src/foundry/client-esm/applications/elements/multi-select.d.mts
@@ -6,7 +6,7 @@ import type AbstractFormInputElement from "./form-element.d.mts";
  * Multi-select components return an array of values as part of form submission.
  * Different implementations may provide different experiences around how inputs are presented to the user.
  */
-export class AbstractMultiSelectElement extends AbstractFormInputElement<Set<string> | string[]> {
+export abstract class AbstractMultiSelectElement extends AbstractFormInputElement<Set<string> | string[]> {
   constructor();
 
   protected _value: Set<string>;
@@ -61,14 +61,18 @@ export class AbstractMultiSelectElement extends AbstractFormInputElement<Set<str
  * ```
  */
 export class HTMLMultiSelectElement extends AbstractMultiSelectElement {
-  /**
-   * Create a HTMLMultiSelectElement using provided configuration data.
-   */
-  static create(config: FormInputConfig<string[]> & Omit<SelectInputConfig, "blank">): HTMLMultiSelectElement;
+  static override tagName: "multi-select";
 
   protected override _buildElements(): (HTMLDivElement | HTMLSelectElement)[];
 
+  protected override _refresh(): void;
+
   protected override _toggleDisabled(disabled: boolean): void;
+
+  /**
+   * Create a HTMLMultiSelectElement using provided configuration data.
+   */
+  static create(config: FormInputConfig<string[]> & Omit<SelectInputConfig, "blank">): HTMLMultiSelectElement;
 }
 /**
  * Provide a multi-select workflow as a grid of input checkbox elements.
@@ -89,7 +93,13 @@ export class HTMLMultiSelectElement extends AbstractMultiSelectElement {
  * ```
  */
 export class HTMLMultiCheckboxElement extends AbstractMultiSelectElement {
+  static override tagName: "multi-checkbox";
+
   protected override _buildElements(): (HTMLFieldSetElement | HTMLLabelElement)[];
 
+  protected override _refresh(): void;
+
+  protected override _activateListeners(): void;
+
   protected override _toggleDisabled(disabled: boolean): void;
 }
diff --git a/src/foundry/client-esm/applications/elements/string-tags.d.mts b/src/foundry/client-esm/applications/elements/string-tags.d.mts
index 1f375ec01..bea2a4937 100644
--- a/src/foundry/client-esm/applications/elements/string-tags.d.mts
+++ b/src/foundry/client-esm/applications/elements/string-tags.d.mts
@@ -60,7 +60,7 @@ declare class HTMLStringTagsElement extends AbstractFormInputElement<Set<string>
   /**
    * Create a HTMLStringTagsElement using provided configuration data.
    */
-  static create(config: HTMLStringTagsElement.StringTagsInputConfig): HTMLElement;
+  static create(config: HTMLStringTagsElement.StringTagsInputConfig): HTMLStringTagsElement;
 }
 
 declare namespace HTMLStringTagsElement {
diff --git a/src/foundry/client-esm/canvas/smaa/smaa.d.mts b/src/foundry/client-esm/canvas/smaa/smaa.d.mts
index 0ea1b05d5..f80e460e9 100644
--- a/src/foundry/client-esm/canvas/smaa/smaa.d.mts
+++ b/src/foundry/client-esm/canvas/smaa/smaa.d.mts
@@ -16,8 +16,7 @@ declare class SMAAFilter extends PIXI.Filter {
    */
   static get PRESETS(): Record<string, SMAAFilter.SMAAFilterConfig>;
 
-  /** @override */
-  apply(
+  override apply(
     filterManager: FilterSystem,
     input: RenderTexture,
     output: RenderTexture,


Test patch:
diff --git a/tests/foundry/client-esm/applications/api/application.test-d.ts b/tests/foundry/client-esm/applications/api/application.test-d.ts
index 4d6376645..136e150af 100644
--- a/tests/foundry/client-esm/applications/api/application.test-d.ts
+++ b/tests/foundry/client-esm/applications/api/application.test-d.ts
@@ -1,4 +1,6 @@
-const { ApplicationV2 } = foundry.applications.api;
+import { expectTypeOf } from "vitest";
+
+const ApplicationV2 = foundry.applications.api.ApplicationV2;
 
 // Regression test for issue where synchronous actions were not being allowed.
 // Reported by @ethaks on Discord, see https://discord.com/channels/732325252788387980/793933527065690184/1266523231188422727.
@@ -33,3 +35,58 @@ declare const x: DeeplyOptional;
 x.render({
   parts: ["part-name"],
 });
+
+declare const applicationV2: foundry.applications.api.ApplicationV2;
+
+expectTypeOf(applicationV2.options).toEqualTypeOf<Readonly<foundry.applications.api.ApplicationV2.Configuration>>();
+expectTypeOf(applicationV2.window).toEqualTypeOf<{
+  header?: HTMLElement | undefined;
+  resize?: HTMLElement | undefined;
+  title: HTMLHeadingElement | undefined;
+  icon: HTMLElement | undefined;
+  close: HTMLButtonElement | undefined;
+  controls: HTMLButtonElement | undefined;
+  controlsDropdown: HTMLDivElement | undefined;
+  onDrag: (event: PointerEvent) => void;
+  onResize: (event: PointerEvent) => void;
+  pointerStartPosition: foundry.applications.api.ApplicationV2.Position | undefined;
+  pointerMoveThrottle: boolean;
+}>();
+expectTypeOf(applicationV2.tabGroups).toEqualTypeOf<Record<string, string>>();
+expectTypeOf(applicationV2.classList).toEqualTypeOf<DOMTokenList>();
+expectTypeOf(applicationV2.id).toEqualTypeOf<string>();
+expectTypeOf(applicationV2.title).toEqualTypeOf<string>();
+expectTypeOf(applicationV2.element).toEqualTypeOf<HTMLElement>();
+expectTypeOf(applicationV2.minimized).toEqualTypeOf<boolean>();
+expectTypeOf(applicationV2.position).toEqualTypeOf<foundry.applications.api.ApplicationV2.Position>();
+expectTypeOf(applicationV2.rendered).toEqualTypeOf<boolean>();
+expectTypeOf(applicationV2.state).toEqualTypeOf<typeof ApplicationV2.RENDER_STATES>();
+expectTypeOf(applicationV2.render()).toEqualTypeOf<Promise<foundry.applications.api.ApplicationV2>>();
+expectTypeOf(applicationV2.close()).toEqualTypeOf<Promise<foundry.applications.api.ApplicationV2>>();
+
+declare const position: foundry.applications.api.ApplicationV2.Position;
+expectTypeOf(applicationV2.setPosition(position)).toEqualTypeOf<foundry.applications.api.ApplicationV2.Position>();
+expectTypeOf(applicationV2.toggleControls()).toEqualTypeOf<void>();
+expectTypeOf(applicationV2.minimize()).toEqualTypeOf<Promise<void>>();
+expectTypeOf(applicationV2.maximize()).toEqualTypeOf<Promise<void>>();
+expectTypeOf(applicationV2.bringToFront()).toEqualTypeOf<void>();
+expectTypeOf(applicationV2.changeTab("", "")).toEqualTypeOf<void>();
+
+declare const formConfig: foundry.applications.api.ApplicationV2.FormConfiguration;
+declare const event: Event;
+expectTypeOf(applicationV2._onChangeForm(formConfig, event)).toEqualTypeOf<void>();
+
+expectTypeOf(ApplicationV2.BASE_APPLICATION).toEqualTypeOf<typeof ApplicationV2>();
+expectTypeOf(ApplicationV2.RENDER_STATES).toEqualTypeOf<{
+  ERROR: -3;
+  CLOSING: -2;
+  CLOSED: -1;
+  NONE: 0;
+  RENDERING: 1;
+  RENDERED: 2;
+}>();
+expectTypeOf(ApplicationV2.emittedEvents).toEqualTypeOf<["render", "close", "position"]>();
+expectTypeOf(ApplicationV2.inheritanceChain()).toEqualTypeOf<
+  Generator<foundry.applications.api.ApplicationV2.AnyConstructor>
+>();
+expectTypeOf(ApplicationV2.parseCSSDimensions("", 1)).toEqualTypeOf<number>();
diff --git a/tests/foundry/client-esm/applications/api/dialog.test-d.ts b/tests/foundry/client-esm/applications/api/dialog.test-d.ts
index ed4073669..86baf0d6b 100644
--- a/tests/foundry/client-esm/applications/api/dialog.test-d.ts
+++ b/tests/foundry/client-esm/applications/api/dialog.test-d.ts
@@ -1,9 +1,11 @@
 import { expectTypeOf } from "vitest";
 
-expectTypeOf(await foundry.applications.api.DialogV2.confirm()).toEqualTypeOf<boolean>();
-expectTypeOf(await foundry.applications.api.DialogV2.confirm({ rejectClose: true })).toEqualTypeOf<boolean>();
-expectTypeOf(await foundry.applications.api.DialogV2.confirm({ rejectClose: false })).toEqualTypeOf<boolean | null>();
-expectTypeOf(await foundry.applications.api.DialogV2.confirm({ rejectClose: 3 > 2 })).toEqualTypeOf<boolean | null>();
+const DialogV2 = foundry.applications.api.DialogV2;
+
+expectTypeOf(await DialogV2.confirm()).toEqualTypeOf<boolean>();
+expectTypeOf(await DialogV2.confirm({ rejectClose: true })).toEqualTypeOf<boolean>();
+expectTypeOf(await DialogV2.confirm({ rejectClose: false })).toEqualTypeOf<boolean | null>();
+expectTypeOf(await DialogV2.confirm({ rejectClose: 3 > 2 })).toEqualTypeOf<boolean | null>();
 
 const numberCallback = async () => 5;
 const okButton = {
@@ -11,18 +13,20 @@ const okButton = {
 };
 
 expectTypeOf(
-  await foundry.applications.api.DialogV2.prompt({
+  await DialogV2.prompt({
     ok: okButton,
   }),
 ).toEqualTypeOf<number>();
 expectTypeOf(
-  await foundry.applications.api.DialogV2.prompt({
+  await DialogV2.prompt({
     ok: okButton,
     rejectClose: false,
   }),
 ).toEqualTypeOf<number | null>();
+
+// note: despite the numeric callback, clicking "ok" returns the string "ok"
 expectTypeOf(
-  await foundry.applications.api.DialogV2.prompt({
+  await DialogV2.prompt({
     ok: okButton,
     buttons: [
       {
@@ -33,18 +37,20 @@ expectTypeOf(
       {
         label: "Bar",
         action: "bar",
+        callback: async () => 3,
       },
     ],
   }),
 ).toEqualTypeOf<number | boolean | string>();
 
 expectTypeOf(
-  await foundry.applications.api.DialogV2.wait({
+  await DialogV2.prompt({
+    ok: okButton,
     buttons: [
       {
         label: "Foo",
         action: "foo",
-        callback: async () => 3 > 2,
+        callback: async () => 3,
       },
       {
         label: "Bar",
@@ -52,9 +58,10 @@ expectTypeOf(
       },
     ],
   }),
-).toEqualTypeOf<boolean | string>();
+).toEqualTypeOf<number | string>();
+
 expectTypeOf(
-  await foundry.applications.api.DialogV2.wait({
+  await DialogV2.wait({
     buttons: [
       {
         label: "Foo",
diff --git a/tests/foundry/client-esm/applications/api/document-sheet.test-d.ts b/tests/foundry/client-esm/applications/api/document-sheet.test-d.ts
new file mode 100644
index 000000000..42dfe2546
--- /dev/null
+++ b/tests/foundry/client-esm/applications/api/document-sheet.test-d.ts
@@ -0,0 +1,22 @@
+import { expectTypeOf } from "vitest";
+import type { DeepPartial } from "fvtt-types/utils";
+
+const DocumentSheetV2 = foundry.applications.api.DocumentSheetV2;
+
+declare const documentSheetV2: foundry.applications.api.DocumentSheetV2<foundry.abstract.Document.Any>;
+
+expectTypeOf(documentSheetV2.document).toEqualTypeOf<foundry.abstract.Document.Any>();
+expectTypeOf(documentSheetV2.title).toEqualTypeOf<string>();
+expectTypeOf(documentSheetV2.isVisible).toEqualTypeOf<boolean>();
+expectTypeOf(documentSheetV2.isEditable).toEqualTypeOf<boolean>();
+
+declare const event: SubmitEvent;
+declare const form: HTMLFormElement;
+declare const formData: FormDataExtended;
+expectTypeOf(documentSheetV2._processFormData(event, form, formData)).toEqualTypeOf<object>();
+expectTypeOf(documentSheetV2._processSubmitData(event, form, formData)).toEqualTypeOf<Promise<void>>();
+expectTypeOf(documentSheetV2.submit()).toEqualTypeOf<Promise<void>>();
+
+expectTypeOf(DocumentSheetV2.DEFAULT_OPTIONS).toEqualTypeOf<
+  DeepPartial<foundry.applications.api.DocumentSheetV2.Configuration> & object
+>();
diff --git a/tests/foundry/client-esm/applications/api/handlebars-application.test-d.ts b/tests/foundry/client-esm/applications/api/handlebars-application.test-d.ts
index 6b0dc2804..ed661e82d 100644
--- a/tests/foundry/client-esm/applications/api/handlebars-application.test-d.ts
+++ b/tests/foundry/client-esm/applications/api/handlebars-application.test-d.ts
@@ -1,5 +1,17 @@
+import { expectTypeOf } from "vitest";
+
 const { ApplicationV2, HandlebarsApplicationMixin } = foundry.applications.api;
 
 // Regression test for "Class static side 'typeof EnabledCompendiumsSettings' incorrectly extends base class static side 'typeof HandlebarsApplication & typeof ApplicationV2'."
 // Reported by @denwav, see https://discord.com/channels/732325252788387980/803646399014109205/1259600593714937978
 export class EnabledCompendiumsSettings extends HandlebarsApplicationMixin(ApplicationV2) {}
+
+class HBMixinTest extends HandlebarsApplicationMixin(ApplicationV2) {}
+const hbMixinTest = new HBMixinTest();
+
+expectTypeOf(hbMixinTest.parts).toEqualTypeOf<Record<string, HTMLElement>>();
+expectTypeOf(hbMixinTest.title).toEqualTypeOf<string>();
+
+expectTypeOf(HBMixinTest.PARTS).toEqualTypeOf<
+  Record<string, foundry.applications.api.HandlebarsApplicationMixin.HandlebarsTemplatePart>
+>();
diff --git a/tests/foundry/client-esm/applications/api/roll-resolver.test-d.ts b/tests/foundry/client-esm/applications/api/roll-resolver.test-d.ts
deleted file mode 100644
index 60f4bf8aa..000000000
--- a/tests/foundry/client-esm/applications/api/roll-resolver.test-d.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { expectTypeOf } from "vitest";
-
-const r = new foundry.applications.dice.RollResolver(new Roll("3d6"));
-
-const t = new Die();
-
-expectTypeOf(r.awaitFulfillment()).toEqualTypeOf<Promise<void>>();
-expectTypeOf(r.registerResult("a", "a", 5)).toEqualTypeOf<boolean>();
-expectTypeOf(await r.resolveResult(t, "a")).toEqualTypeOf<number | void>();
-expectTypeOf(await r.resolveResult(t, "a", { reroll: true, explode: true })).toEqualTypeOf<number | void>();
-
-expectTypeOf(
-  await foundry.applications.dice.RollResolver._fulfillRoll(
-    new SubmitEvent("a"),
-    new HTMLFormElement(),
-    new FormDataExtended(new HTMLFormElement()),
-  ),
-).toEqualTypeOf<void>();
-
-expectTypeOf(await r.addTerm(t)).toEqualTypeOf<void>();
-expectTypeOf(r._checkDone()).toEqualTypeOf<void>();
-expectTypeOf(r._toggleSubmission(true)).toEqualTypeOf<void>();
diff --git a/tests/foundry/client-esm/applications/apps/permission-config.test-d.ts b/tests/foundry/client-esm/applications/apps/permission-config.test-d.ts
index e05099610..d2085477c 100644
--- a/tests/foundry/client-esm/applications/apps/permission-config.test-d.ts
+++ b/tests/foundry/client-esm/applications/apps/permission-config.test-d.ts
@@ -1,1 +1,19 @@
-// no public members to test
+import { expectTypeOf } from "vitest";
+import type { ConformRecord } from "fvtt-types/utils";
+
+const PermissionConfig = foundry.applications.apps.PermissionConfig;
+
+const permissionConfig = new PermissionConfig();
+expectTypeOf(permissionConfig._prepareContext({})).toEqualTypeOf<
+  Promise<foundry.applications.apps.PermissionConfig.RenderContext>
+>();
+
+expectTypeOf(PermissionConfig.DEFAULT_OPTIONS).toEqualTypeOf<
+  Partial<foundry.applications.api.ApplicationV2.Configuration>
+>();
+expectTypeOf(PermissionConfig.PARTS).toEqualTypeOf<
+  ConformRecord<
+    foundry.applications.apps.PermissionConfig.Parts,
+    foundry.applications.api.HandlebarsApplicationMixin.HandlebarsTemplatePart
+  >
+>();
diff --git a/tests/foundry/client-esm/applications/dice/roll-resolver.test-d.ts b/tests/foundry/client-esm/applications/dice/roll-resolver.test-d.ts
new file mode 100644
index 000000000..6fb6c3fb9
--- /dev/null
+++ b/tests/foundry/client-esm/applications/dice/roll-resolver.test-d.ts
@@ -0,0 +1,24 @@
+import { expectTypeOf } from "vitest";
+
+const rollResolver = new foundry.applications.dice.RollResolver(new Roll("3d6"));
+
+expectTypeOf(rollResolver.fulfillable).toEqualTypeOf<
+  Map<string, foundry.applications.dice.RollResolver.DiceTermFulfillmentDescriptor>
+>();
+expectTypeOf(rollResolver.roll).toEqualTypeOf<Roll>();
+expectTypeOf(rollResolver.awaitFulfillment()).toEqualTypeOf<Promise<void>>();
+expectTypeOf(rollResolver.registerResult("a", "a", 5)).toEqualTypeOf<boolean>();
+
+declare const term: foundry.dice.terms.DiceTerm;
+expectTypeOf(rollResolver.resolveResult(term, "a")).toEqualTypeOf<Promise<number | void>>();
+expectTypeOf(rollResolver.resolveResult(term, "a", { reroll: true, explode: true })).toEqualTypeOf<
+  Promise<number | void>
+>();
+expectTypeOf(rollResolver.addTerm(term)).toEqualTypeOf<Promise<void>>();
+expectTypeOf(rollResolver._checkDone()).toEqualTypeOf<void>();
+expectTypeOf(rollResolver._toggleSubmission(true)).toEqualTypeOf<void>();
+
+declare const event: SubmitEvent;
+declare const form: HTMLFormElement;
+declare const formData: FormDataExtended;
+expectTypeOf(foundry.applications.dice.RollResolver._fulfillRoll(event, form, formData)).toEqualTypeOf<Promise<void>>();
diff --git a/tests/foundry/client-esm/applications/elements/color-picker.test-d.ts b/tests/foundry/client-esm/applications/elements/color-picker.test-d.ts
new file mode 100644
index 000000000..4ae8313ee
--- /dev/null
+++ b/tests/foundry/client-esm/applications/elements/color-picker.test-d.ts
@@ -0,0 +1,8 @@
+import { expectTypeOf } from "vitest";
+import type { FormInputConfig } from "../../../../../src/foundry/client-esm/applications/forms/fields.d.mts";
+
+declare const config: FormInputConfig<unknown>;
+expectTypeOf(foundry.applications.elements.HTMLColorPickerElement.tagName).toEqualTypeOf<"color-picker">();
+expectTypeOf(
+  foundry.applications.elements.HTMLColorPickerElement.create(config),
+).toEqualTypeOf<foundry.applications.elements.HTMLColorPickerElement>();
diff --git a/tests/foundry/client-esm/applications/elements/document-tags.test-d.ts b/tests/foundry/client-esm/applications/elements/document-tags.test-d.ts
new file mode 100644
index 000000000..9acf0a1ca
--- /dev/null
+++ b/tests/foundry/client-esm/applications/elements/document-tags.test-d.ts
@@ -0,0 +1,18 @@
+import { expectTypeOf } from "vitest";
+
+const tagsElement = new foundry.applications.elements.HTMLDocumentTagsElement();
+
+expectTypeOf(tagsElement.type).toEqualTypeOf<string | null>();
+expectTypeOf(tagsElement.single).toEqualTypeOf<boolean>();
+expectTypeOf(tagsElement.max).toEqualTypeOf<number>();
+
+declare const doc: Actor;
+expectTypeOf(tagsElement._validateDocument(doc)).toEqualTypeOf<void>();
+
+expectTypeOf(foundry.applications.elements.HTMLDocumentTagsElement.tagName).toEqualTypeOf<"document-tags">();
+expectTypeOf(foundry.applications.elements.HTMLDocumentTagsElement.renderTag("", "")).toEqualTypeOf<HTMLDivElement>();
+
+declare const config: foundry.applications.elements.HTMLDocumentTagsElement.DocumentTagsInputConfig;
+expectTypeOf(
+  foundry.applications.elements.HTMLDocumentTagsElement.create(config),
+).toEqualTypeOf<foundry.applications.elements.HTMLDocumentTagsElement>();
diff --git a/tests/foundry/client-esm/applications/elements/file-picker.test-d.ts b/tests/foundry/client-esm/applications/elements/file-picker.test-d.ts
new file mode 100644
index 000000000..4f75e5119
--- /dev/null
+++ b/tests/foundry/client-esm/applications/elements/file-picker.test-d.ts
@@ -0,0 +1,15 @@
+import { expectTypeOf } from "vitest";
+
+const fileElement = new foundry.applications.elements.HTMLFilePickerElement();
+
+expectTypeOf(fileElement.input).toEqualTypeOf<HTMLInputElement>();
+expectTypeOf(fileElement.button).toEqualTypeOf<HTMLButtonElement>();
+expectTypeOf(fileElement.picker).toEqualTypeOf<FilePicker>();
+expectTypeOf(fileElement.type).toEqualTypeOf<FilePicker.Type>();
+expectTypeOf(fileElement.noupload).toEqualTypeOf<boolean>();
+expectTypeOf(fileElement.picker).toEqualTypeOf<FilePicker>();
+
+expectTypeOf(foundry.applications.elements.HTMLFilePickerElement.tagName).toEqualTypeOf<"file-picker">();
+
+declare const config: foundry.applications.elements.HTMLFilePickerElement.FilePickerInputConfig;
+expectTypeOf(foundry.applications.elements.HTMLFilePickerElement.create(config)).toEqualTypeOf<HTMLElement>();
diff --git a/tests/foundry/client-esm/applications/elements/form-element.test-d.ts b/tests/foundry/client-esm/applications/elements/form-element.test-d.ts
new file mode 100644
index 000000000..c4f531ae1
--- /dev/null
+++ b/tests/foundry/client-esm/applications/elements/form-element.test-d.ts
@@ -0,0 +1,13 @@
+import { expectTypeOf } from "vitest";
+
+declare const formInput: foundry.applications.elements.AbstractFormInputElement<number>;
+
+expectTypeOf(formInput.form).toEqualTypeOf<HTMLFormElement>();
+expectTypeOf(formInput.name).toEqualTypeOf<string>();
+expectTypeOf(formInput.value).toEqualTypeOf<number>();
+expectTypeOf(formInput.disabled).toEqualTypeOf<boolean>();
+expectTypeOf(formInput.editable).toEqualTypeOf<boolean>();
+expectTypeOf(formInput.connectedCallback()).toEqualTypeOf<void>();
+
+expectTypeOf(foundry.applications.elements.AbstractFormInputElement.tagName).toEqualTypeOf<string>();
+expectTypeOf(foundry.applications.elements.AbstractFormInputElement.formAssociated).toEqualTypeOf<boolean>();
diff --git a/tests/foundry/client-esm/applications/elements/hue-slider.test-d.ts b/tests/foundry/client-esm/applications/elements/hue-slider.test-d.ts
new file mode 100644
index 000000000..6a7b6620f
--- /dev/null
+++ b/tests/foundry/client-esm/applications/elements/hue-slider.test-d.ts
@@ -0,0 +1,3 @@
+import { expectTypeOf } from "vitest";
+
+expectTypeOf(foundry.applications.elements.HTMLHueSelectorSlider.tagName).toEqualTypeOf<"hue-slider">();
diff --git a/tests/foundry/client-esm/applications/elements/multi-select.test-d.ts b/tests/foundry/client-esm/applications/elements/multi-select.test-d.ts
new file mode 100644
index 000000000..30c9a5332
--- /dev/null
+++ b/tests/foundry/client-esm/applications/elements/multi-select.test-d.ts
@@ -0,0 +1,21 @@
+import { expectTypeOf } from "vitest";
+import type {
+  FormInputConfig,
+  SelectInputConfig,
+} from "../../../../../src/foundry/client-esm/applications/forms/fields.d.mts";
+
+declare const multiSelect: foundry.applications.elements.AbstractMultiSelectElement;
+
+expectTypeOf(multiSelect.select("")).toEqualTypeOf<void>();
+expectTypeOf(multiSelect.unselect("")).toEqualTypeOf<void>();
+
+expectTypeOf(foundry.applications.elements.AbstractMultiSelectElement.tagName).toEqualTypeOf<string>();
+
+expectTypeOf(foundry.applications.elements.HTMLMultiSelectElement.tagName).toEqualTypeOf<"multi-select">();
+
+declare const multiSelectConfig: FormInputConfig<string[]> & Omit<SelectInputConfig, "blank">;
+expectTypeOf(
+  foundry.applications.elements.HTMLMultiSelectElement.create(multiSelectConfig),
+).toEqualTypeOf<foundry.applications.elements.HTMLMultiSelectElement>();
+
+expectTypeOf(foundry.applications.elements.HTMLMultiCheckboxElement.tagName).toEqualTypeOf<"multi-checkbox">();
diff --git a/tests/foundry/client-esm/applications/elements/prosemirror-editor.test-d.ts b/tests/foundry/client-esm/applications/elements/prosemirror-editor.test-d.ts
new file mode 100644
index 000000000..310cb1493
--- /dev/null
+++ b/tests/foundry/client-esm/applications/elements/prosemirror-editor.test-d.ts
@@ -0,0 +1,15 @@
+import { expectTypeOf } from "vitest";
+
+const proseMirror = new foundry.applications.elements.HTMLProseMirrorElement();
+
+expectTypeOf(proseMirror.disconnectedCallback()).toEqualTypeOf<void>();
+expectTypeOf(proseMirror._buildElements()).toEqualTypeOf<(HTMLButtonElement | HTMLDivElement)[]>();
+expectTypeOf(proseMirror._getValue()).toEqualTypeOf<string>();
+expectTypeOf(proseMirror._toggleDisabled(true)).toEqualTypeOf<void>();
+
+expectTypeOf(foundry.applications.elements.HTMLProseMirrorElement.tagName).toEqualTypeOf<"prose-mirror">();
+
+declare const config: foundry.applications.elements.HTMLProseMirrorElement.ProseMirrorInputConfig;
+expectTypeOf(
+  foundry.applications.elements.HTMLProseMirrorElement.create(config),
+).toEqualTypeOf<foundry.applications.elements.HTMLProseMirrorElement>();
diff --git a/tests/foundry/client-esm/applications/elements/range-picker.test-d.ts b/tests/foundry/client-esm/applications/elements/range-picker.test-d.ts
new file mode 100644
index 000000000..73c836357
--- /dev/null
+++ b/tests/foundry/client-esm/applications/elements/range-picker.test-d.ts
@@ -0,0 +1,12 @@
+import { expectTypeOf } from "vitest";
+
+const proseMirror = new foundry.applications.elements.HTMLRangePickerElement();
+
+expectTypeOf(proseMirror.valueAsNumber).toEqualTypeOf<number>();
+
+expectTypeOf(foundry.applications.elements.HTMLRangePickerElement.tagName).toEqualTypeOf<"range-picker">();
+
+declare const config: foundry.applications.elements.HTMLRangePickerElement.RangePickerInputConfig;
+expectTypeOf(
+  foundry.applications.elements.HTMLRangePickerElement.create(config),
+).toEqualTypeOf<foundry.applications.elements.HTMLRangePickerElement>();
diff --git a/tests/foundry/client-esm/applications/elements/string-tags.test-d.ts b/tests/foundry/client-esm/applications/elements/string-tags.test-d.ts
new file mode 100644
index 000000000..749e1de6c
--- /dev/null
+++ b/tests/foundry/client-esm/applications/elements/string-tags.test-d.ts
@@ -0,0 +1,23 @@
+import { expectTypeOf } from "vitest";
+
+const stringTags = new foundry.applications.elements.HTMLStringTagsElement();
+
+expectTypeOf(stringTags._value).toEqualTypeOf<Set<string>>();
+
+expectTypeOf(foundry.applications.elements.HTMLStringTagsElement.tagName).toEqualTypeOf<"string-tags">();
+
+expectTypeOf(foundry.applications.elements.HTMLStringTagsElement.icons).toEqualTypeOf<{
+  add: string;
+  remove: string;
+}>();
+expectTypeOf(foundry.applications.elements.HTMLStringTagsElement.labels).toEqualTypeOf<{
+  add: string;
+  remove: string;
+  placeholder: string;
+}>();
+expectTypeOf(foundry.applications.elements.HTMLStringTagsElement.renderTag("")).toEqualTypeOf<HTMLDivElement>();
+
+declare const config: foundry.applications.elements.HTMLStringTagsElement.StringTagsInputConfig;
+expectTypeOf(
+  foundry.applications.elements.HTMLStringTagsElement.create(config),
+).toEqualTypeOf<foundry.applications.elements.HTMLStringTagsElement>();
diff --git a/tests/foundry/client-esm/applications/forms/fields.test-d.ts b/tests/foundry/client-esm/applications/forms/fields.test-d.ts
new file mode 100644
index 000000000..0045cd15a
--- /dev/null
+++ b/tests/foundry/client-esm/applications/forms/fields.test-d.ts
@@ -0,0 +1,47 @@
+import { expectTypeOf } from "vitest";
+import type {
+  EditorInputConfig,
+  FormGroupConfig,
+  FormInputConfig,
+  FormSelectOption,
+  MultiSelectInputConfig,
+  NumberInputConfig,
+  SelectInputConfig,
+  TextAreaInputConfig,
+} from "../../../../../src/foundry/client-esm/applications/forms/fields.d.mts";
+
+declare const config: FormGroupConfig;
+expectTypeOf(foundry.applications.fields.createFormGroup(config)).toEqualTypeOf<HTMLDivElement>();
+
+declare const checkConfig: FormInputConfig<boolean>;
+expectTypeOf(foundry.applications.fields.createCheckboxInput(checkConfig)).toEqualTypeOf<HTMLInputElement>();
+
+declare const editorConfig: EditorInputConfig;
+expectTypeOf(foundry.applications.fields.createEditorInput(editorConfig)).toEqualTypeOf<HTMLDivElement>();
+
+declare const multiSelectConfig: MultiSelectInputConfig;
+expectTypeOf(foundry.applications.fields.createMultiSelectInput(multiSelectConfig)).toEqualTypeOf<HTMLSelectElement>();
+
+declare const numberConfig: NumberInputConfig;
+expectTypeOf(foundry.applications.fields.createNumberInput(numberConfig)).toEqualTypeOf<HTMLInputElement>();
+
+declare const selectConfig: SelectInputConfig & FormInputConfig<string>;
+expectTypeOf(foundry.applications.fields.createSelectInput(selectConfig)).toEqualTypeOf<HTMLSelectElement>();
+
+declare const textAreaConfig: TextAreaInputConfig;
+expectTypeOf(foundry.applications.fields.createTextareaInput(textAreaConfig)).toEqualTypeOf<HTMLTextAreaElement>();
+
+declare const textConfig: FormInputConfig<string>;
+expectTypeOf(foundry.applications.fields.createTextInput(textConfig)).toEqualTypeOf<HTMLInputElement>();
+
+declare const selectOptionsGroupsConfig: FormInputConfig<unknown> & SelectInputConfig;
+expectTypeOf(foundry.applications.fields.prepareSelectOptionGroups(selectOptionsGroupsConfig)).toEqualTypeOf<
+  {
+    group: string;
+    options: FormSelectOption[];
+  }[]
+>();
+
+declare const inputAttributeConfig: FormInputConfig<unknown>;
+declare const element: HTMLElement;
+expectTypeOf(foundry.applications.fields.setInputAttributes(element, inputAttributeConfig)).toEqualTypeOf<void>();
diff --git a/tests/foundry/client-esm/applications/sheets/actor-sheet.test-d.ts b/tests/foundry/client-esm/applications/sheets/actor-sheet.test-d.ts
index 5b4fabf59..383f1d488 100644
--- a/tests/foundry/client-esm/applications/sheets/actor-sheet.test-d.ts
+++ b/tests/foundry/client-esm/applications/sheets/actor-sheet.test-d.ts
@@ -2,6 +2,8 @@ import { expectTypeOf } from "vitest";
 
 // Regression test for `error TS2339: Property 'type' does not exist on type 'this["object"]'.`
 // Reported @acthy on Discord, see https://discord.com/channels/732325252788387980/803646399014109205/1290726809024856197.
-const actorSheet = new ActorSheet(new Actor({ name: "Test Actor" }));
-
+const actorSheet = new foundry.applications.sheets.ActorSheetV2(new Actor({ name: "Test Actor" }));
 expectTypeOf(actorSheet.actor.type).toEqualTypeOf<foundry.documents.BaseActor.TypeNames>();
+
+expectTypeOf(actorSheet.actor).toEqualTypeOf<Actor>();
+expectTypeOf(actorSheet.token).toEqualTypeOf<Actor["token"]>();
diff --git a/tests/foundry/client-esm/applications/sheets/ambient-light-config.test-d.ts b/tests/foundry/client-esm/applications/sheets/ambient-light-config.test-d.ts
new file mode 100644
index 000000000..d3d1e259f
--- /dev/null
+++ b/tests/foundry/client-esm/applications/sheets/ambient-light-config.test-d.ts
@@ -0,0 +1,20 @@
+import { expectTypeOf } from "vitest";
+import type { DeepPartial } from "../../../../../src/utils/index.d.mts";
+
+declare const doc: AmbientLightDocument;
+const lightConfig = new foundry.applications.sheets.AmbientLightConfig({ document: doc });
+
+expectTypeOf(lightConfig.preview).toEqualTypeOf<AmbientLightDocument | undefined>();
+expectTypeOf(lightConfig.tabGroups).toEqualTypeOf<{ sheet: string }>();
+expectTypeOf(lightConfig.changeTab("", "")).toEqualTypeOf<void>();
+
+declare const formConfig: foundry.applications.api.ApplicationV2.FormConfiguration;
+declare const event: Event;
+expectTypeOf(lightConfig._onChangeForm(formConfig, event)).toEqualTypeOf<void>();
+
+expectTypeOf(foundry.applications.sheets.AmbientLightConfig.DEFAULT_OPTIONS).toEqualTypeOf<
+  DeepPartial<foundry.applications.api.DocumentSheetV2.Configuration<AmbientLightDocument>>
+>();
+expectTypeOf(foundry.applications.sheets.AmbientLightConfig.PARTS).toEqualTypeOf<
+  Record<string, foundry.applications.api.HandlebarsApplicationMixin.HandlebarsTemplatePart>
+>();
diff --git a/tests/foundry/client-esm/applications/sheets/ambient-sound.config.test-d.ts b/tests/foundry/client-esm/applications/sheets/ambient-sound.config.test-d.ts
new file mode 100644
index 000000000..1ab4c4e49
--- /dev/null
+++ b/tests/foundry/client-esm/applications/sheets/ambient-sound.config.test-d.ts
@@ -0,0 +1,18 @@
+import { expectTypeOf } from "vitest";
+import type { DeepPartial } from "../../../../../src/utils/index.d.mts";
+
+declare const doc: AmbientSoundDocument;
+const soundSheet = new foundry.applications.sheets.AmbientSoundConfig({ document: doc });
+
+expectTypeOf(soundSheet.title).toEqualTypeOf<string>();
+
+declare const formConfig: foundry.applications.api.ApplicationV2.FormConfiguration;
+declare const event: Event;
+expectTypeOf(soundSheet._onChangeForm(formConfig, event)).toEqualTypeOf<void>();
+
+expectTypeOf(foundry.applications.sheets.AmbientSoundConfig.DEFAULT_OPTIONS).toEqualTypeOf<
+  DeepPartial<foundry.applications.api.DocumentSheetV2.Configuration<AmbientSoundDocument>>
+>();
+expectTypeOf(foundry.applications.sheets.AmbientSoundConfig.PARTS).toEqualTypeOf<
+  Record<string, foundry.applications.api.HandlebarsApplicationMixin.HandlebarsTemplatePart>
+>();
diff --git a/tests/foundry/client-esm/applications/sheets/item-sheet.test-d.ts b/tests/foundry/client-esm/applications/sheets/item-sheet.test-d.ts
new file mode 100644
index 000000000..fbbb90ebf
--- /dev/null
+++ b/tests/foundry/client-esm/applications/sheets/item-sheet.test-d.ts
@@ -0,0 +1,7 @@
+import { expectTypeOf } from "vitest";
+
+declare const doc: Item;
+const itemSheet = new foundry.applications.sheets.ItemSheetV2({ document: doc });
+
+expectTypeOf(itemSheet.item).toEqualTypeOf<Item>();
+expectTypeOf(itemSheet.actor).toEqualTypeOf<Actor | null>();
diff --git a/tests/foundry/client-esm/applications/sheets/region-behavior-config.test-d.ts b/tests/foundry/client-esm/applications/sheets/region-behavior-config.test-d.ts
new file mode 100644
index 000000000..757727a79
--- /dev/null
+++ b/tests/foundry/client-esm/applications/sheets/region-behavior-config.test-d.ts
@@ -0,0 +1,14 @@
+import { expectTypeOf } from "vitest";
+import type { FormFooterButton } from "../../../../../src/foundry/client-esm/applications/_types.d.mts";
+
+declare const doc: RegionBehavior;
+const regionSheet = new foundry.applications.sheets.RegionBehaviorConfig({ document: doc });
+
+expectTypeOf(regionSheet._getButtons()).toEqualTypeOf<FormFooterButton[]>();
+
+expectTypeOf(foundry.applications.sheets.RegionBehaviorConfig.DEFAULT_OPTIONS).toEqualTypeOf<
+  foundry.applications.api.DocumentSheetV2.Configuration<RegionBehavior>
+>();
+expectTypeOf(foundry.applications.sheets.RegionBehaviorConfig.PARTS).toEqualTypeOf<
+  Record<string, foundry.applications.api.HandlebarsApplicationMixin.HandlebarsTemplatePart>
+>();
diff --git a/tests/foundry/client-esm/applications/sheets/region-config.test-d.ts b/tests/foundry/client-esm/applications/sheets/region-config.test-d.ts
new file mode 100644
index 000000000..381920712
--- /dev/null
+++ b/tests/foundry/client-esm/applications/sheets/region-config.test-d.ts
@@ -0,0 +1,15 @@
+import { expectTypeOf } from "vitest";
+
+declare const doc: RegionDocument;
+const regionSheet = new foundry.applications.sheets.RegionConfig({ document: doc });
+
+expectTypeOf(regionSheet.tabGroups).toEqualTypeOf<{
+  sheet: string;
+}>();
+
+expectTypeOf(foundry.applications.sheets.RegionConfig.DEFAULT_OPTIONS).toEqualTypeOf<
+  foundry.applications.api.DocumentSheetV2.Configuration<RegionDocument>
+>();
+expectTypeOf(foundry.applications.sheets.RegionConfig.PARTS).toEqualTypeOf<
+  Record<string, foundry.applications.api.HandlebarsApplicationMixin.HandlebarsTemplatePart>
+>();
diff --git a/tests/foundry/client-esm/applications/sheets/user-config.test-d.ts b/tests/foundry/client-esm/applications/sheets/user-config.test-d.ts
new file mode 100644
index 000000000..0e1637c74
--- /dev/null
+++ b/tests/foundry/client-esm/applications/sheets/user-config.test-d.ts
@@ -0,0 +1,13 @@
+import { expectTypeOf } from "vitest";
+
+declare const doc: User;
+const userSheet = new foundry.applications.sheets.UserConfig({ document: doc });
+
+expectTypeOf(userSheet.title).toEqualTypeOf<string>();
+
+expectTypeOf(foundry.applications.sheets.UserConfig.DEFAULT_OPTIONS).toEqualTypeOf<
+  foundry.applications.api.DocumentSheetV2.Configuration<User>
+>();
+expectTypeOf(foundry.applications.sheets.UserConfig.PARTS).toEqualTypeOf<
+  Record<string, foundry.applications.api.HandlebarsApplicationMixin.HandlebarsTemplatePart>
+>();
diff --git a/tests/foundry/client-esm/applications/ui/region-legend.test-d.ts b/tests/foundry/client-esm/applications/ui/region-legend.test-d.ts
new file mode 100644
index 000000000..7147a1140
--- /dev/null
+++ b/tests/foundry/client-esm/applications/ui/region-legend.test-d.ts
@@ -0,0 +1,18 @@
+import { expectTypeOf } from "vitest";
+import type { DeepPartial } from "../../../../../src/utils/index.d.mts";
+
+const regionLegend = new foundry.applications.ui.RegionLegend({});
+
+expectTypeOf(regionLegend.elevation).toEqualTypeOf<{ bottom: number; top: number }>();
+expectTypeOf(regionLegend.close()).toEqualTypeOf<Promise<foundry.applications.ui.RegionLegend>>();
+
+declare const region: RegionDocument;
+expectTypeOf(regionLegend._isRegionVisible(region)).toEqualTypeOf<boolean>();
+expectTypeOf(regionLegend._hoverRegion(region, true)).toEqualTypeOf<void>();
+
+expectTypeOf(foundry.applications.ui.RegionLegend.DEFAULT_OPTIONS).toEqualTypeOf<
+  DeepPartial<foundry.applications.api.ApplicationV2.Configuration> & object
+>();
+expectTypeOf(foundry.applications.ui.RegionLegend.PARTS).toEqualTypeOf<
+  Record<string, foundry.applications.api.HandlebarsApplicationMixin.HandlebarsTemplatePart>
+>();
diff --git a/tests/foundry/client-esm/audio/audio.test-d.ts b/tests/foundry/client-esm/audio/audio.test-d.ts
deleted file mode 100644
index f13ff5a45..000000000
--- a/tests/foundry/client-esm/audio/audio.test-d.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-import { expectTypeOf } from "vitest";
-
-const audioHelper = new AudioHelper();
-expectTypeOf(audioHelper).toEqualTypeOf<AudioHelper>();
-expectTypeOf(audioHelper.context).toEqualTypeOf<AudioContext | undefined>();
-expectTypeOf(audioHelper.buffers).toEqualTypeOf<
-  Map<string, { buffer: AudioBuffer; lastAccessed: number; playing: boolean; size: number }>
->();
-expectTypeOf(audioHelper.sounds).toEqualTypeOf<Map<string, Sound>>();
-expectTypeOf(audioHelper.playing).toEqualTypeOf<Map<number, Sound>>();
-expectTypeOf(audioHelper.pending).toEqualTypeOf<(() => void)[]>();
-expectTypeOf(audioHelper.locked).toEqualTypeOf<boolean>();
-expectTypeOf(AudioHelper.levelAnalyserNativeInterval).toEqualTypeOf<number>();
-expectTypeOf(AudioHelper.registerSettings()).toEqualTypeOf<void>();
-expectTypeOf(audioHelper.create({ src: "a/path/to/some/sound/file.ogg" })).toEqualTypeOf<Sound>();
-expectTypeOf(
-  audioHelper.create({
-    src: "a/path/to/some/sound/file.ogg",
-    singleton: false,
-    preload: true,
-    autoplay: true,
-    autoplayOptions: { loop: true, offset: 42, volume: 0.5, fade: 3 },
-  }),
-).toEqualTypeOf<Sound>();
-expectTypeOf(AudioHelper.hasAudioExtension("a/path/to/some/sound/file.ogg")).toEqualTypeOf<boolean>();
-expectTypeOf(AudioHelper.getDefaultSoundName("a/path/to/some/sound/file.ogg")).toEqualTypeOf<string>();
-expectTypeOf(audioHelper.play("a/path/to/some/sound/file.ogg")).toEqualTypeOf<Promise<Sound>>();
-expectTypeOf(
-  audioHelper.play("a/path/to/some/sound/file.ogg", { loop: true, offset: 42, volume: 0.5, fade: 3 }),
-).toEqualTypeOf<Promise<Sound>>();
-expectTypeOf(audioHelper.awaitFirstGesture()).toEqualTypeOf<Promise<AudioContext>>();
-expectTypeOf(audioHelper.preload("a/path/to/some/sound/file.ogg")).toEqualTypeOf<Promise<Sound>>();
-
-declare const socket: io.Socket;
-
-expectTypeOf(AudioHelper._activateSocketListeners(socket)).toEqualTypeOf<void>();
-expectTypeOf(
-  AudioHelper.play({
-    src: "a/path/to/some/sound/file.ogg",
-  }),
-).toEqualTypeOf<Promise<Sound>>();
-expectTypeOf(
-  AudioHelper.play(
-    {
-      src: "a/path/to/some/sound/file.ogg",
-      volume: 0.8,
-      autoplay: false,
-      loop: true,
-    },
-    true,
-  ),
-).toEqualTypeOf<Promise<Sound>>();
-expectTypeOf(AudioHelper.preloadSound("a/path/to/some/sound/file.ogg")).toEqualTypeOf<Promise<Sound>>();
-expectTypeOf(AudioHelper.inputToVolume(0.5)).toEqualTypeOf<number>();
-expectTypeOf(AudioHelper.inputToVolume("0.5", 1.7)).toEqualTypeOf<number>();
-expectTypeOf(AudioHelper.volumeToInput(0.5)).toEqualTypeOf<number>();
-expectTypeOf(AudioHelper.volumeToInput(0.5, 1.7)).toEqualTypeOf<number>();
-expectTypeOf(audioHelper.getAudioContext()).toEqualTypeOf<AudioContext | null>();
-
-declare const stream: MediaStream;
-declare const callback: (maxDecibel: number, fftArray: Float32Array) => void;
-
-expectTypeOf(audioHelper.startLevelReports("some id", stream, callback)).toEqualTypeOf<boolean | undefined>();
-expectTypeOf(audioHelper.startLevelReports("some id", stream, callback, 60, 0.2)).toEqualTypeOf<boolean | undefined>();
-expectTypeOf(audioHelper.stopLevelReports("some id")).toEqualTypeOf<void>();
diff --git a/tests/foundry/client-esm/audio/biquad.test-d.ts b/tests/foundry/client-esm/audio/biquad.test-d.ts
new file mode 100644
index 000000000..e03bd8752
--- /dev/null
+++ b/tests/foundry/client-esm/audio/biquad.test-d.ts
@@ -0,0 +1,7 @@
+import { expectTypeOf } from "vitest";
+
+declare const context: AudioContext;
+const biquadFilterEffect = new foundry.audio.BiquadFilterEffect(context);
+
+expectTypeOf(biquadFilterEffect.intensity).toEqualTypeOf<number>();
+expectTypeOf(biquadFilterEffect.update()).toEqualTypeOf<void>();
diff --git a/tests/foundry/client-esm/audio/cache.test-d.ts b/tests/foundry/client-esm/audio/cache.test-d.ts
new file mode 100644
index 000000000..72221d757
--- /dev/null
+++ b/tests/foundry/client-esm/audio/cache.test-d.ts
@@ -0,0 +1,12 @@
+import { expectTypeOf } from "vitest";
+
+const cache = new foundry.audio.AudioBufferCache();
+
+expectTypeOf(cache.usage).toEqualTypeOf<foundry.audio.AudioBufferCache.Usage>();
+expectTypeOf(cache.getBuffer("")).toEqualTypeOf<AudioBuffer>();
+
+declare const buffer: AudioBuffer;
+expectTypeOf(cache.setBuffer("", buffer)).toEqualTypeOf<foundry.audio.AudioBufferCache>();
+expectTypeOf(cache.delete("")).toEqualTypeOf<boolean>();
+expectTypeOf(cache.lock("")).toEqualTypeOf<void>();
+expectTypeOf(cache.toString()).toEqualTypeOf<string>();
diff --git a/tests/foundry/client-esm/audio/container.test-d.ts b/tests/foundry/client-esm/audio/container.test-d.ts
deleted file mode 100644
index d1e1ac6ca..000000000
--- a/tests/foundry/client-esm/audio/container.test-d.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { expectTypeOf } from "vitest";
-
-const audioContainer = new AudioContainer("a/path/to/some/sound/file.ogg");
-expectTypeOf(audioContainer).toEqualTypeOf<AudioContainer>();
-expectTypeOf(audioContainer.src).toEqualTypeOf<string>();
-expectTypeOf(audioContainer.sourceNode).toEqualTypeOf<
-  AudioBufferSourceNode | MediaElementAudioSourceNode | undefined
->();
-expectTypeOf(audioContainer.gainNode).toEqualTypeOf<GainNode | undefined>();
-expectTypeOf(audioContainer.isBuffer).toEqualTypeOf<boolean>();
-expectTypeOf(audioContainer.loaded).toEqualTypeOf<boolean>();
-expectTypeOf(audioContainer.failed).toEqualTypeOf<boolean>();
-expectTypeOf(audioContainer.playing).toEqualTypeOf<boolean>();
-expectTypeOf(audioContainer.loop).toEqualTypeOf<boolean>();
-expectTypeOf(AudioContainer.MAX_BUFFER_DURATION).toEqualTypeOf<number>();
-expectTypeOf(audioContainer.buffer).toEqualTypeOf<AudioBuffer | null | undefined>();
-expectTypeOf(audioContainer.context).toEqualTypeOf<AudioContext>();
-expectTypeOf(audioContainer.duration).toEqualTypeOf<number | undefined>();
-expectTypeOf(audioContainer.element).toEqualTypeOf<HTMLMediaElement | undefined>();
-expectTypeOf(audioContainer.load()).toEqualTypeOf<Promise<void>>();
-expectTypeOf(audioContainer.play(0, () => undefined)).toEqualTypeOf<void>();
-expectTypeOf(audioContainer.stop()).toEqualTypeOf<void>();
diff --git a/tests/foundry/client-esm/audio/convolver.test-d.ts b/tests/foundry/client-esm/audio/convolver.test-d.ts
new file mode 100644
index 000000000..d6ee53a27
--- /dev/null
+++ b/tests/foundry/client-esm/audio/convolver.test-d.ts
@@ -0,0 +1,17 @@
+import { expectTypeOf } from "vitest";
+
+declare const context: AudioContext;
+const effect = new foundry.audio.ConvolverEffect(context);
+
+expectTypeOf(effect.intensity).toEqualTypeOf<number>();
+expectTypeOf(effect.update(4)).toEqualTypeOf<void>();
+
+declare const audioNode: AudioNode;
+declare const audioParam: AudioParam;
+expectTypeOf(effect.disconnect()).toEqualTypeOf<void>();
+expectTypeOf(effect.disconnect(audioNode)).toEqualTypeOf<void>();
+expectTypeOf(effect.disconnect(audioParam)).toEqualTypeOf<void>();
+expectTypeOf(effect.connect(audioNode)).toEqualTypeOf<AudioNode>();
+expectTypeOf(effect.connect(audioParam)).toEqualTypeOf<AudioParam>();
+
+expectTypeOf(effect.onConnectFrom(audioNode)).toEqualTypeOf<void>();
diff --git a/tests/foundry/client-esm/audio/helper.test-d.ts b/tests/foundry/client-esm/audio/helper.test-d.ts
new file mode 100644
index 000000000..ef72929f2
--- /dev/null
+++ b/tests/foundry/client-esm/audio/helper.test-d.ts
@@ -0,0 +1,43 @@
+import { expectTypeOf } from "vitest";
+import type Sound from "../../../../src/foundry/client-esm/audio/sound.d.mts";
+
+const helper = new foundry.audio.AudioHelper();
+
+expectTypeOf(helper.sounds).toEqualTypeOf<Map<string, Sound>>();
+expectTypeOf(helper.playing).toEqualTypeOf<Map<number, Sound>>();
+expectTypeOf(helper.pending).toEqualTypeOf<(() => void)[]>();
+expectTypeOf(helper.unlock).toEqualTypeOf<Promise<void>>();
+expectTypeOf(helper.locked).toEqualTypeOf<boolean>();
+expectTypeOf(helper.music).toEqualTypeOf<AudioContext>();
+expectTypeOf(helper.environment).toEqualTypeOf<AudioContext>();
+expectTypeOf(helper.interface).toEqualTypeOf<AudioContext>();
+expectTypeOf(helper.context).toEqualTypeOf<AudioContext | undefined>();
+expectTypeOf(helper.buffers).toEqualTypeOf<foundry.audio.AudioBufferCache>();
+
+declare const context: AudioContext;
+expectTypeOf(helper.create({ src: "", context: context })).toEqualTypeOf<Sound>();
+expectTypeOf(helper.play("", {})).toEqualTypeOf<Promise<Sound>>();
+expectTypeOf(helper.awaitFirstGesture()).toEqualTypeOf<Promise<void>>();
+expectTypeOf(helper.preload("")).toEqualTypeOf<Promise<Sound>>();
+expectTypeOf(helper.getAnalyzerContext()).toEqualTypeOf<AudioContext | null>();
+
+declare const mediaStream: MediaStream;
+declare const cb: (maxDecibel: number, fftArray: Float32Array) => void;
+expectTypeOf(helper.startLevelReports("", mediaStream, cb)).toEqualTypeOf<boolean | undefined>();
+expectTypeOf(helper.debug("")).toEqualTypeOf<void>();
+
+expectTypeOf(foundry.audio.AudioHelper.levelAnalyserNativeInterval).toEqualTypeOf<number>();
+expectTypeOf(foundry.audio.AudioHelper.THRESHOLD_CACHE_SIZE_BYTES).toEqualTypeOf<number>();
+expectTypeOf(foundry.audio.AudioHelper.hasAudioExtension("")).toEqualTypeOf<boolean>();
+expectTypeOf(foundry.audio.AudioHelper.getDefaultSoundName("")).toEqualTypeOf<string>();
+expectTypeOf(foundry.audio.AudioHelper.registerSettings()).toEqualTypeOf<void>();
+
+declare const socket: io.Socket;
+expectTypeOf(foundry.audio.AudioHelper._activateSocketListeners(socket)).toEqualTypeOf<void>();
+
+declare const data: foundry.audio.AudioHelper.PlayData;
+expectTypeOf(foundry.audio.AudioHelper.play(data)).toEqualTypeOf<Promise<Sound>>();
+expectTypeOf(foundry.audio.AudioHelper.inputToVolume(1)).toEqualTypeOf<number>();
+expectTypeOf(foundry.audio.AudioHelper.inputToVolume("")).toEqualTypeOf<number>();
+expectTypeOf(foundry.audio.AudioHelper.volumeToInput(1)).toEqualTypeOf<number>();
+expectTypeOf(foundry.audio.AudioHelper.play(data)).toEqualTypeOf<Promise<Sound>>();
diff --git a/tests/foundry/client-esm/audio/sound.test-d.ts b/tests/foundry/client-esm/audio/sound.test-d.ts
index 4c5a76a19..41c3f4303 100644
--- a/tests/foundry/client-esm/audio/sound.test-d.ts
+++ b/tests/foundry/client-esm/audio/sound.test-d.ts
@@ -1,40 +1,57 @@
 import { expectTypeOf } from "vitest";
+import type { ValueOf } from "../../../../src/utils/index.d.mts";
 
-const sound = new Sound("a/path/to/some/sound/file.ogg");
+const sound = new foundry.audio.Sound("a/path/to/some/sound/file.ogg");
 
-expectTypeOf(sound).toEqualTypeOf<Sound>();
 expectTypeOf(sound.id).toEqualTypeOf<number>();
 expectTypeOf(sound.src).toEqualTypeOf<string>();
-expectTypeOf(sound.container).toEqualTypeOf<AudioContainer>();
-expectTypeOf(sound.startTime).toEqualTypeOf<number | undefined>();
-expectTypeOf(sound.pausedTime).toEqualTypeOf<number | undefined>();
-expectTypeOf(sound.events).toEqualTypeOf<Sound.EventCallbacks>();
-expectTypeOf(sound.loading).toEqualTypeOf<Promise<void> | undefined>();
 expectTypeOf(sound.context).toEqualTypeOf<AudioContext>();
-expectTypeOf(sound.node).toEqualTypeOf<AudioBufferSourceNode | MediaElementAudioSourceNode | undefined>();
-expectTypeOf(sound.gain).toEqualTypeOf<AudioParam | undefined>();
-expectTypeOf(sound.currentTime).toEqualTypeOf<number | undefined>();
-expectTypeOf(sound.duration).toEqualTypeOf<number | undefined>();
+expectTypeOf(sound.sourceNode).toEqualTypeOf<AudioBufferSourceNode | MediaElementAudioSourceNode>();
+expectTypeOf(sound.gainNode).toEqualTypeOf<GainNode>();
+expectTypeOf(sound.buffer).toEqualTypeOf<AudioBuffer | null>();
+expectTypeOf(sound.element).toEqualTypeOf<HTMLAudioElement | null>();
+expectTypeOf(sound._state).toEqualTypeOf<ValueOf<typeof foundry.audio.Sound.STATES>>();
 expectTypeOf(sound.loaded).toEqualTypeOf<boolean>();
 expectTypeOf(sound.failed).toEqualTypeOf<boolean>();
 expectTypeOf(sound.playing).toEqualTypeOf<boolean>();
+expectTypeOf(sound.isBuffer).toEqualTypeOf<boolean>();
+expectTypeOf(sound.gain).toEqualTypeOf<AudioParam>();
+expectTypeOf(sound.destination).toEqualTypeOf<AudioNode>();
+expectTypeOf(sound.effects).toEqualTypeOf<AudioNode[]>();
+expectTypeOf(sound.volume).toEqualTypeOf<number>();
+expectTypeOf(sound.startTime).toEqualTypeOf<number>();
+expectTypeOf(sound.pausedTime).toEqualTypeOf<number>();
+expectTypeOf(sound.duration).toEqualTypeOf<number>();
+expectTypeOf(sound.currentTime).toEqualTypeOf<number>();
 expectTypeOf(sound.loop).toEqualTypeOf<boolean>();
-expectTypeOf(sound.volume).toEqualTypeOf<number | undefined>();
-expectTypeOf(sound.fade(0)).toEqualTypeOf<Promise<void>>();
-expectTypeOf(sound.fade(0, { duration: 42, from: 0.5, type: "exponential" })).toEqualTypeOf<Promise<void>>();
-expectTypeOf(sound.load()).toEqualTypeOf<Promise<Sound>>();
+expectTypeOf(sound.load()).toEqualTypeOf<Promise<foundry.audio.Sound>>();
 expectTypeOf(
   sound.load({ autoplay: true, autoplayOptions: { loop: true, offset: 2, volume: 0.7, fade: 3 } }),
-).toEqualTypeOf<Promise<Sound>>();
-expectTypeOf(sound.play()).toEqualTypeOf<void>();
-expectTypeOf(sound.play({ loop: true, offset: 2, volume: 0.7, fade: 3 })).toEqualTypeOf<void>();
+).toEqualTypeOf<Promise<foundry.audio.Sound>>();
+expectTypeOf(sound.play()).toEqualTypeOf<Promise<foundry.audio.Sound>>();
+expectTypeOf(sound.play({ loop: true, offset: 2, volume: 0.7, fade: 3 })).toEqualTypeOf<Promise<foundry.audio.Sound>>();
 expectTypeOf(sound.pause()).toEqualTypeOf<void>();
-expectTypeOf(sound.stop()).toEqualTypeOf<void>();
-
-declare const soundCallback: (sound: Sound) => void;
+expectTypeOf(sound.stop()).toEqualTypeOf<Promise<foundry.audio.Sound>>();
+expectTypeOf(sound.fade(1)).toEqualTypeOf<Promise<void>>();
+expectTypeOf(sound.wait(1)).toEqualTypeOf<Promise<void>>();
 
+declare const soundCallback: (sound: foundry.audio.Sound) => void;
 expectTypeOf(sound.schedule(soundCallback, 42)).toEqualTypeOf<Promise<void>>();
-expectTypeOf(sound.emit("pause")).toEqualTypeOf<void>();
-expectTypeOf(sound.off("end", 42)).toEqualTypeOf<void>();
-expectTypeOf(sound.off("start", soundCallback)).toEqualTypeOf<void>();
-expectTypeOf(sound.on("stop", soundCallback)).toEqualTypeOf<number>();
+expectTypeOf(sound.schedule(() => 3, 3)).toEqualTypeOf<Promise<number>>();
+expectTypeOf(sound.schedule(() => "a", 3)).toEqualTypeOf<Promise<string>>();
+expectTypeOf(sound.schedule(async () => "a", 3)).toEqualTypeOf<Promise<string>>();
+expectTypeOf(sound.applyEffects()).toEqualTypeOf<void>();
+
+expectTypeOf(foundry.audio.Sound.STATES).toEqualTypeOf<{
+  FAILED: -1;
+  NONE: 0;
+  LOADING: 1;
+  LOADED: 2;
+  STARTING: 3;
+  PLAYING: 4;
+  PAUSED: 5;
+  STOPPING: 6;
+  STOPPED: 7;
+}>();
+expectTypeOf(foundry.audio.Sound.MAX_BUFFER_DURATION).toEqualTypeOf<number>();
+expectTypeOf(foundry.audio.Sound.emittedEvents).toEqualTypeOf<string[]>();
diff --git a/tests/foundry/client-esm/audio/timeout.test-d.ts b/tests/foundry/client-esm/audio/timeout.test-d.ts
new file mode 100644
index 000000000..ac5bb906b
--- /dev/null
+++ b/tests/foundry/client-esm/audio/timeout.test-d.ts
@@ -0,0 +1,19 @@
+import { expectTypeOf } from "vitest";
+
+const timeout = new foundry.audio.AudioTimeout(3);
+
+const callbackString = { callback: () => "" };
+const callbackNumber = { callback: () => 0 };
+const callbackAsync = { callback: async () => "" };
+
+expectTypeOf(new foundry.audio.AudioTimeout(3, callbackString).complete).toEqualTypeOf<Promise<string> | undefined>();
+expectTypeOf(new foundry.audio.AudioTimeout(3, callbackNumber).complete).toEqualTypeOf<Promise<number> | undefined>();
+expectTypeOf(new foundry.audio.AudioTimeout(3, callbackAsync).complete).toEqualTypeOf<
+  Promise<Promise<string>> | undefined
+>();
+expectTypeOf(timeout.cancel()).toEqualTypeOf<void>();
+expectTypeOf(timeout.end()).toEqualTypeOf<void>();
+
+expectTypeOf(foundry.audio.AudioTimeout.wait(3, callbackString)).toEqualTypeOf<Promise<string>>();
+expectTypeOf(foundry.audio.AudioTimeout.wait(3, callbackNumber)).toEqualTypeOf<Promise<number>>();
+expectTypeOf(foundry.audio.AudioTimeout.wait(3, callbackAsync)).toEqualTypeOf<Promise<Promise<string>>>();
diff --git a/tests/foundry/client-esm/canvas/edges/collision-result.mjs.test-d.ts b/tests/foundry/client-esm/canvas/edges/collision-result.mjs.test-d.ts
deleted file mode 100644
index 35877dc6f..000000000
--- a/tests/foundry/client-esm/canvas/edges/collision-result.mjs.test-d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { expectTypeOf } from "vitest";
-
-const myCollisionResult = new foundry.canvas.edges.CollisionResult();
-
-expectTypeOf(myCollisionResult.cwEdges).toEqualTypeOf<Set<PolygonEdge>>();
diff --git a/tests/foundry/client-esm/canvas/edges/collision.test-d.ts b/tests/foundry/client-esm/canvas/edges/collision.test-d.ts
new file mode 100644
index 000000000..65da3d6ed
--- /dev/null
+++ b/tests/foundry/client-esm/canvas/edges/collision.test-d.ts
@@ -0,0 +1,16 @@
+import { expectTypeOf } from "vitest";
+
+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<EdgeSet>();
+expectTypeOf(myCollisionResult.isBehind).toEqualTypeOf<boolean | undefined>();
+expectTypeOf(myCollisionResult.isLimited).toEqualTypeOf<boolean | undefined>();
+expectTypeOf(myCollisionResult.wasLimited).toEqualTypeOf<boolean | undefined>();
+expectTypeOf(myCollisionResult.limitedCW).toEqualTypeOf<boolean>();
+expectTypeOf(myCollisionResult.limitedCCW).toEqualTypeOf<boolean>();
+expectTypeOf(myCollisionResult.blockedCW).toEqualTypeOf<boolean>();
+expectTypeOf(myCollisionResult.blockedCCW).toEqualTypeOf<boolean>();
+expectTypeOf(myCollisionResult.blockedCWPrev).toEqualTypeOf<boolean>();
+expectTypeOf(myCollisionResult.blockedCCWPrev).toEqualTypeOf<boolean>();
diff --git a/tests/foundry/client-esm/canvas/edges/edge.test-d.ts b/tests/foundry/client-esm/canvas/edges/edge.test-d.ts
new file mode 100644
index 000000000..2ee9ada0c
--- /dev/null
+++ b/tests/foundry/client-esm/canvas/edges/edge.test-d.ts
@@ -0,0 +1,37 @@
+import { expectTypeOf } from "vitest";
+import type { PIXI } from "../../../../../src/configuration/globals.d.mts";
+import type { WallThresholdData } from "../../../../../src/foundry/common/documents/_types.d.mts";
+
+declare const p: Canvas.Point;
+const edge = new foundry.canvas.edges.Edge(p, p);
+
+expectTypeOf(edge.a).toEqualTypeOf<PIXI.Point>();
+expectTypeOf(edge.b).toEqualTypeOf<PIXI.Point>();
+expectTypeOf(edge.id).toEqualTypeOf<string>();
+expectTypeOf(edge.object).toEqualTypeOf<PlaceableObject>();
+expectTypeOf(edge.type).toEqualTypeOf<foundry.canvas.edges.Edge.EdgeTypes>();
+expectTypeOf(edge.direction).toEqualTypeOf<foundry.CONST.WALL_DIRECTIONS>();
+expectTypeOf(edge.light).toEqualTypeOf<foundry.CONST.WALL_SENSE_TYPES>();
+expectTypeOf(edge.move).toEqualTypeOf<foundry.CONST.WALL_SENSE_TYPES>();
+expectTypeOf(edge.sight).toEqualTypeOf<foundry.CONST.WALL_SENSE_TYPES>();
+expectTypeOf(edge.sound).toEqualTypeOf<foundry.CONST.WALL_SENSE_TYPES>();
+expectTypeOf(edge.threshold).toEqualTypeOf<WallThresholdData>();
+expectTypeOf(edge.nw).toEqualTypeOf<Canvas.Point>();
+expectTypeOf(edge.se).toEqualTypeOf<Canvas.Point>();
+expectTypeOf(edge.bounds).toEqualTypeOf<PIXI.Rectangle>();
+expectTypeOf(edge.intersections).toEqualTypeOf<
+  { edge: foundry.canvas.edges.Edge; intersection: foundry.utils.LineIntersection }[]
+>();
+expectTypeOf(edge.vertexA).toEqualTypeOf<foundry.canvas.edges.PolygonVertex>();
+expectTypeOf(edge.vertexB).toEqualTypeOf<foundry.canvas.edges.PolygonVertex>();
+expectTypeOf(edge.isLimited("direction")).toEqualTypeOf<boolean>();
+expectTypeOf(edge.clone()).toEqualTypeOf<foundry.canvas.edges.Edge>();
+
+declare const edge2: foundry.canvas.edges.Edge;
+expectTypeOf(edge.getIntersection(edge2)).toEqualTypeOf<foundry.utils.LineIntersection | void>();
+expectTypeOf(edge.applyThreshold("", p)).toEqualTypeOf<boolean>();
+expectTypeOf(edge.orientPoint(p)).toEqualTypeOf<foundry.CONST.WALL_DIRECTIONS>();
+expectTypeOf(edge.recordIntersections(edge2)).toEqualTypeOf<void>();
+expectTypeOf(edge.removeIntersections()).toEqualTypeOf<void>();
+
+expectTypeOf(foundry.canvas.edges.Edge.identifyEdgeIntersections([edge2])).toEqualTypeOf<void>();
diff --git a/tests/foundry/client-esm/canvas/edges/edges.mjs.test-d.ts b/tests/foundry/client-esm/canvas/edges/edges.test-d.ts
similarity index 85%
rename from tests/foundry/client-esm/canvas/edges/edges.mjs.test-d.ts
rename to tests/foundry/client-esm/canvas/edges/edges.test-d.ts
index 4e997474a..f9634cc40 100644
--- a/tests/foundry/client-esm/canvas/edges/edges.mjs.test-d.ts
+++ b/tests/foundry/client-esm/canvas/edges/edges.test-d.ts
@@ -4,7 +4,7 @@ const myCanvasEdges = new foundry.canvas.edges.CanvasEdges();
 
 // Calls inside of Canvas
 expectTypeOf(myCanvasEdges.initialize()).toEqualTypeOf<void>();
-expectTypeOf(myCanvasEdges.clear()).toEqualTypeOf<void>();
+expectTypeOf(myCanvasEdges.refresh()).toEqualTypeOf<void>();
 
 for (const [key, edge] of myCanvasEdges) {
   expectTypeOf(key).toEqualTypeOf<string>();
diff --git a/tests/foundry/client-esm/canvas/edges/vertex.mjs.test-d.ts b/tests/foundry/client-esm/canvas/edges/vertex.mjs.test-d.ts
deleted file mode 100644
index 6808127be..000000000
--- a/tests/foundry/client-esm/canvas/edges/vertex.mjs.test-d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { expectTypeOf } from "vitest";
-
-const myVertex = new foundry.canvas.edges.PolygonVertex(2, 2);
-
-expectTypeOf(myVertex.equals(myVertex)).toEqualTypeOf<boolean>();
diff --git a/tests/foundry/client-esm/canvas/edges/vertex.test-d.ts b/tests/foundry/client-esm/canvas/edges/vertex.test-d.ts
new file mode 100644
index 000000000..f2e66b30e
--- /dev/null
+++ b/tests/foundry/client-esm/canvas/edges/vertex.test-d.ts
@@ -0,0 +1,28 @@
+import { expectTypeOf } from "vitest";
+
+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<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>();
+expectTypeOf(vertex.isLimitingCCW).toEqualTypeOf<boolean | undefined>();
+expectTypeOf(vertex.isLimitingCW).toEqualTypeOf<boolean | undefined>();
+expectTypeOf(vertex.isBlockingCCW).toEqualTypeOf<boolean | undefined>();
+expectTypeOf(vertex.isBlockingCW).toEqualTypeOf<boolean | undefined>();
+expectTypeOf(vertex.isInternal).toEqualTypeOf<boolean>();
+expectTypeOf(vertex.restriction).toEqualTypeOf<number>();
+expectTypeOf(vertex._visited).toEqualTypeOf<boolean>();
+expectTypeOf(vertex.isLimited).toEqualTypeOf<boolean>();
+
+declare const edge: foundry.canvas.edges.Edge;
+expectTypeOf(vertex.attachEdge(edge, 3, "")).toEqualTypeOf<void>();
+expectTypeOf(vertex.equals(vertex)).toEqualTypeOf<boolean>();
+
+declare const p: Canvas.Point;
+expectTypeOf(foundry.canvas.edges.PolygonVertex.fromPoint(p)).toEqualTypeOf<foundry.canvas.edges.PolygonVertex>();