@league-of-foundry-developers/foundry-vtt-types 13.340.0 → 13.340.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (543) hide show
  1. package/README.md +6 -3
  2. package/package.json +40 -18
  3. package/src/configuration/configuration.d.mts +24 -23
  4. package/src/configuration/documents.d.mts +295 -0
  5. package/src/configuration/globals.d.mts +8 -2
  6. package/src/configuration/index.d.mts +1 -0
  7. package/src/foundry/client/apps/app.d.mts +121 -119
  8. package/src/foundry/client/apps/av/av-config.d.mts +13 -8
  9. package/src/foundry/client/apps/av/cameras.d.mts +11 -11
  10. package/src/foundry/client/apps/dice/dice-config.d.mts +22 -8
  11. package/src/foundry/client/apps/form.d.mts +112 -94
  12. package/src/foundry/client/apps/forms/actor.d.mts +22 -12
  13. package/src/foundry/client/apps/forms/adventure-exporter.d.mts +13 -8
  14. package/src/foundry/client/apps/forms/adventure-importer.d.mts +15 -7
  15. package/src/foundry/client/apps/forms/base-sheet.d.mts +14 -7
  16. package/src/foundry/client/apps/forms/card-config.d.mts +17 -9
  17. package/src/foundry/client/apps/forms/cards-config.d.mts +13 -14
  18. package/src/foundry/client/apps/forms/combat-config.d.mts +7 -7
  19. package/src/foundry/client/apps/forms/combatant-config.d.mts +4 -4
  20. package/src/foundry/client/apps/forms/default-sheets-config.d.mts +1 -1
  21. package/src/foundry/client/apps/forms/effect-config.d.mts +6 -6
  22. package/src/foundry/client/apps/forms/folder-config.d.mts +5 -5
  23. package/src/foundry/client/apps/forms/fonts.d.mts +42 -35
  24. package/src/foundry/client/apps/forms/grid-config.d.mts +11 -11
  25. package/src/foundry/client/apps/forms/image-popout.d.mts +28 -22
  26. package/src/foundry/client/apps/forms/item.d.mts +6 -6
  27. package/src/foundry/client/apps/forms/journal-page-sheet.d.mts +17 -15
  28. package/src/foundry/client/apps/forms/journal-sheet.d.mts +46 -37
  29. package/src/foundry/client/apps/forms/macro-config.d.mts +6 -6
  30. package/src/foundry/client/apps/forms/measure-template.d.mts +8 -8
  31. package/src/foundry/client/apps/forms/ownership.d.mts +5 -5
  32. package/src/foundry/client/apps/forms/playlist-config.d.mts +7 -9
  33. package/src/foundry/client/apps/forms/playlist-sound-config.d.mts +6 -6
  34. package/src/foundry/client/apps/forms/roll-table-config.d.mts +9 -10
  35. package/src/foundry/client/apps/forms/scene-config.d.mts +39 -39
  36. package/src/foundry/client/apps/forms/sheet-config.d.mts +8 -8
  37. package/src/foundry/client/apps/forms/user-config.d.mts +11 -11
  38. package/src/foundry/client/apps/hud/chatbubble.d.mts +14 -9
  39. package/src/foundry/client/apps/hud/container.d.mts +3 -3
  40. package/src/foundry/client/apps/hud/controls.d.mts +124 -84
  41. package/src/foundry/client/apps/hud/hotbar.d.mts +12 -12
  42. package/src/foundry/client/apps/hud/hud.d.mts +4 -4
  43. package/src/foundry/client/apps/hud/menu.d.mts +6 -6
  44. package/src/foundry/client/apps/hud/navigation.d.mts +11 -11
  45. package/src/foundry/client/apps/hud/pause.d.mts +7 -7
  46. package/src/foundry/client/apps/hud/players.d.mts +11 -11
  47. package/src/foundry/client/apps/i18n.d.mts +31 -27
  48. package/src/foundry/client/apps/placeables/drawing-config.d.mts +41 -33
  49. package/src/foundry/client/apps/placeables/drawing-hud.d.mts +4 -4
  50. package/src/foundry/client/apps/placeables/index.d.mts +0 -2
  51. package/src/foundry/client/apps/placeables/note-config.d.mts +27 -17
  52. package/src/foundry/client/apps/placeables/tile-config.d.mts +23 -10
  53. package/src/foundry/client/apps/placeables/tile-hud.d.mts +8 -8
  54. package/src/foundry/client/apps/placeables/token-config.d.mts +84 -63
  55. package/src/foundry/client/apps/placeables/token-hud.d.mts +10 -10
  56. package/src/foundry/client/apps/placeables/wall-config.d.mts +19 -16
  57. package/src/foundry/client/apps/sidebar/apps/chat-popout.d.mts +5 -5
  58. package/src/foundry/client/apps/sidebar/apps/client-settings.d.mts +2 -2
  59. package/src/foundry/client/apps/sidebar/apps/compendium.d.mts +13 -10
  60. package/src/foundry/client/apps/sidebar/apps/invitation-links.d.mts +3 -3
  61. package/src/foundry/client/apps/sidebar/apps/keybindings-config.d.mts +1 -1
  62. package/src/foundry/client/apps/sidebar/apps/module-management.d.mts +6 -6
  63. package/src/foundry/client/apps/sidebar/apps/permission-config.d.mts +6 -6
  64. package/src/foundry/client/apps/sidebar/apps/support-details.d.mts +33 -28
  65. package/src/foundry/client/apps/sidebar/apps/tours-management.d.mts +1 -1
  66. package/src/foundry/client/apps/sidebar/apps/world-config.d.mts +12 -9
  67. package/src/foundry/client/apps/sidebar/directory-tab-mixin.d.mts +40 -32
  68. package/src/foundry/client/apps/sidebar/document-directory.d.mts +44 -37
  69. package/src/foundry/client/apps/sidebar/package-configuration.d.mts +3 -3
  70. package/src/foundry/client/apps/sidebar/sidebar-tab.d.mts +3 -3
  71. package/src/foundry/client/apps/sidebar/sidebar.d.mts +7 -7
  72. package/src/foundry/client/apps/sidebar/tabs/actors-directory.d.mts +4 -4
  73. package/src/foundry/client/apps/sidebar/tabs/cards-directory.d.mts +4 -4
  74. package/src/foundry/client/apps/sidebar/tabs/chat-log.d.mts +34 -29
  75. package/src/foundry/client/apps/sidebar/tabs/combat-tracker.d.mts +15 -15
  76. package/src/foundry/client/apps/sidebar/tabs/compendium-directory.d.mts +21 -12
  77. package/src/foundry/client/apps/sidebar/tabs/items-directory.d.mts +4 -4
  78. package/src/foundry/client/apps/sidebar/tabs/journal-directory.d.mts +4 -4
  79. package/src/foundry/client/apps/sidebar/tabs/macros-directory.d.mts +8 -8
  80. package/src/foundry/client/apps/sidebar/tabs/playlists-directory.d.mts +21 -21
  81. package/src/foundry/client/apps/sidebar/tabs/roll-table-directory.d.mts +4 -4
  82. package/src/foundry/client/apps/sidebar/tabs/scenes-directory.d.mts +6 -6
  83. package/src/foundry/client/apps/sidebar/tabs/settings.d.mts +12 -12
  84. package/src/foundry/client/apps/templates.d.mts +2 -2
  85. package/src/foundry/client/av/clients/simplepeer.d.mts +4 -4
  86. package/src/foundry/client/av/settings.d.mts +16 -13
  87. package/src/foundry/client/config.d.mts +1982 -1823
  88. package/src/foundry/client/core/document-index.d.mts +12 -4
  89. package/src/foundry/client/core/hooks.d.mts +0 -2
  90. package/src/foundry/client/core/image.d.mts +13 -11
  91. package/src/foundry/client/core/issues.d.mts +11 -6
  92. package/src/foundry/client/core/keybindings.d.mts +3 -3
  93. package/src/foundry/client/core/nue.d.mts +1 -1
  94. package/src/foundry/client/core/packages.d.mts +393 -63
  95. package/src/foundry/client/core/settings.d.mts +34 -12
  96. package/src/foundry/client/core/socket.d.mts +2 -2
  97. package/src/foundry/client/core/sorting.d.mts +6 -6
  98. package/src/foundry/client/core/time.d.mts +6 -3
  99. package/src/foundry/client/core/tooltip.d.mts +1 -1
  100. package/src/foundry/client/core/tour.d.mts +58 -49
  101. package/src/foundry/client/core/tours.d.mts +1 -1
  102. package/src/foundry/client/core/utils.d.mts +3 -3
  103. package/src/foundry/client/core/workers.d.mts +24 -17
  104. package/src/foundry/client/data/abstract/canvas-document.d.mts +9 -15
  105. package/src/foundry/client/data/abstract/client-document.d.mts +133 -172
  106. package/src/foundry/client/data/abstract/directory-collection-mixin.d.mts +14 -36
  107. package/src/foundry/client/data/abstract/document-collection.d.mts +89 -65
  108. package/src/foundry/client/data/abstract/world-collection.d.mts +47 -53
  109. package/src/foundry/client/data/collections/actors.d.mts +24 -31
  110. package/src/foundry/client/data/collections/cards.d.mts +10 -6
  111. package/src/foundry/client/data/collections/combats.d.mts +12 -8
  112. package/src/foundry/client/data/collections/compendium-collection.d.mts +79 -66
  113. package/src/foundry/client/data/collections/compendium-folders.d.mts +6 -6
  114. package/src/foundry/client/data/collections/compendium-packs.d.mts +4 -4
  115. package/src/foundry/client/data/collections/fog.d.mts +10 -6
  116. package/src/foundry/client/data/collections/folder.d.mts +15 -10
  117. package/src/foundry/client/data/collections/items.d.mts +11 -7
  118. package/src/foundry/client/data/collections/journal.d.mts +16 -10
  119. package/src/foundry/client/data/collections/macros.d.mts +15 -22
  120. package/src/foundry/client/data/collections/messages.d.mts +14 -10
  121. package/src/foundry/client/data/collections/playlists.d.mts +12 -9
  122. package/src/foundry/client/data/collections/scenes.d.mts +19 -31
  123. package/src/foundry/client/data/collections/settings.d.mts +10 -6
  124. package/src/foundry/client/data/collections/tables.d.mts +11 -7
  125. package/src/foundry/client/data/collections/users.d.mts +14 -11
  126. package/src/foundry/client/data/documents/active-effect.d.mts +652 -88
  127. package/src/foundry/client/data/documents/actor-delta.d.mts +672 -28
  128. package/src/foundry/client/data/documents/actor.d.mts +722 -60
  129. package/src/foundry/client/data/documents/adventure.d.mts +482 -49
  130. package/src/foundry/client/data/documents/ambient-light.d.mts +426 -21
  131. package/src/foundry/client/data/documents/ambient-sound.d.mts +474 -15
  132. package/src/foundry/client/data/documents/card.d.mts +570 -39
  133. package/src/foundry/client/data/documents/cards.d.mts +742 -78
  134. package/src/foundry/client/data/documents/chat-message.d.mts +578 -45
  135. package/src/foundry/client/data/documents/combat.d.mts +701 -71
  136. package/src/foundry/client/data/documents/combatant.d.mts +510 -28
  137. package/src/foundry/client/data/documents/drawing.d.mts +543 -16
  138. package/src/foundry/client/data/documents/fog-exploration.d.mts +413 -27
  139. package/src/foundry/client/data/documents/folder.d.mts +461 -40
  140. package/src/foundry/client/data/documents/item.d.mts +679 -25
  141. package/src/foundry/client/data/documents/journal-entry-page.d.mts +587 -21
  142. package/src/foundry/client/data/documents/journal-entry.d.mts +621 -20
  143. package/src/foundry/client/data/documents/macro.d.mts +530 -25
  144. package/src/foundry/client/data/documents/measured-template.d.mts +480 -16
  145. package/src/foundry/client/data/documents/note.d.mts +495 -18
  146. package/src/foundry/client/data/documents/playlist-sound.d.mts +429 -27
  147. package/src/foundry/client/data/documents/playlist.d.mts +666 -75
  148. package/src/foundry/client/data/documents/region-behavior.d.mts +468 -38
  149. package/src/foundry/client/data/documents/region.d.mts +661 -35
  150. package/src/foundry/client/data/documents/scene.d.mts +986 -149
  151. package/src/foundry/client/data/documents/setting.d.mts +397 -15
  152. package/src/foundry/client/data/documents/table-result.d.mts +479 -17
  153. package/src/foundry/client/data/documents/table.d.mts +663 -80
  154. package/src/foundry/client/data/documents/tile.d.mts +502 -16
  155. package/src/foundry/client/data/documents/token.d.mts +1114 -90
  156. package/src/foundry/client/data/documents/user.d.mts +495 -27
  157. package/src/foundry/client/data/documents/wall.d.mts +550 -15
  158. package/src/foundry/client/game.d.mts +58 -92
  159. package/src/foundry/client/head.d.mts +5 -6
  160. package/src/foundry/client/hooks.d.mts +237 -221
  161. package/src/foundry/client/pixi/board.d.mts +95 -89
  162. package/src/foundry/client/pixi/core/containers/base-canvas-group.d.mts +6 -5
  163. package/src/foundry/client/pixi/core/containers/cached-container.d.mts +5 -5
  164. package/src/foundry/client/pixi/core/containers/full-canvas-container.d.mts +2 -2
  165. package/src/foundry/client/pixi/core/containers/point-source-mesh.d.mts +3 -3
  166. package/src/foundry/client/pixi/core/containers/quad-mesh.d.mts +3 -3
  167. package/src/foundry/client/pixi/core/containers/quadtree.d.mts +23 -21
  168. package/src/foundry/client/pixi/core/containers/sprite-mesh.d.mts +5 -5
  169. package/src/foundry/client/pixi/core/containers/unbound-container.d.mts +5 -5
  170. package/src/foundry/client/pixi/core/interaction/canvas-animation.d.mts +57 -51
  171. package/src/foundry/client/pixi/core/interaction/control-icon.d.mts +3 -3
  172. package/src/foundry/client/pixi/core/interaction/mouse-handler.d.mts +7 -7
  173. package/src/foundry/client/pixi/core/interaction/ping.d.mts +19 -11
  174. package/src/foundry/client/pixi/core/interaction/pings/chevron.d.mts +7 -2
  175. package/src/foundry/client/pixi/core/interaction/pings/pulse.d.mts +29 -23
  176. package/src/foundry/client/pixi/core/interaction/render-flags.d.mts +83 -38
  177. package/src/foundry/client/pixi/core/interaction/resize-handle.d.mts +3 -3
  178. package/src/foundry/client/pixi/core/interaction/targets.d.mts +9 -9
  179. package/src/foundry/client/pixi/core/loader.d.mts +8 -8
  180. package/src/foundry/client/pixi/core/shapes/limited-angle-polygon.d.mts +9 -4
  181. package/src/foundry/client/pixi/core/shapes/polygon-mesher.d.mts +3 -3
  182. package/src/foundry/client/pixi/core/shapes/precise-text.d.mts +3 -3
  183. package/src/foundry/client/pixi/core/shapes/ray.d.mts +23 -17
  184. package/src/foundry/client/pixi/core/shapes/source-polygon.d.mts +19 -14
  185. package/src/foundry/client/pixi/extensions/circle.d.mts +1 -1
  186. package/src/foundry/client/pixi/extensions/observable-transform.d.mts +3 -3
  187. package/src/foundry/client/pixi/groups/effects.d.mts +4 -4
  188. package/src/foundry/client/pixi/groups/environment.d.mts +5 -5
  189. package/src/foundry/client/pixi/groups/hidden.d.mts +3 -3
  190. package/src/foundry/client/pixi/groups/interface.d.mts +6 -6
  191. package/src/foundry/client/pixi/groups/overlay.d.mts +3 -3
  192. package/src/foundry/client/pixi/groups/primary.d.mts +11 -11
  193. package/src/foundry/client/pixi/groups/rendered.d.mts +3 -3
  194. package/src/foundry/client/pixi/layers/base/canvas-layer.d.mts +3 -3
  195. package/src/foundry/client/pixi/layers/base/interaction-layer.d.mts +13 -13
  196. package/src/foundry/client/pixi/layers/base/placeables-layer.d.mts +279 -233
  197. package/src/foundry/client/pixi/layers/controls/cursor.d.mts +17 -8
  198. package/src/foundry/client/pixi/layers/controls/door.d.mts +26 -14
  199. package/src/foundry/client/pixi/layers/controls/layer.d.mts +89 -79
  200. package/src/foundry/client/pixi/layers/controls/ruler.d.mts +121 -96
  201. package/src/foundry/client/pixi/layers/effects/background-effects.d.mts +4 -5
  202. package/src/foundry/client/pixi/layers/effects/coloration-effects.d.mts +6 -4
  203. package/src/foundry/client/pixi/layers/effects/darkness-effects.d.mts +7 -4
  204. package/src/foundry/client/pixi/layers/effects/illumination-effects.d.mts +19 -16
  205. package/src/foundry/client/pixi/layers/effects/visibility.d.mts +101 -84
  206. package/src/foundry/client/pixi/layers/effects/weather/particles/effect.d.mts +13 -4
  207. package/src/foundry/client/pixi/layers/effects/weather/particles/leaves.d.mts +31 -2
  208. package/src/foundry/client/pixi/layers/effects/weather-effects.d.mts +134 -59
  209. package/src/foundry/client/pixi/layers/grid/highlight.d.mts +13 -3
  210. package/src/foundry/client/pixi/layers/grid/layer.d.mts +89 -87
  211. package/src/foundry/client/pixi/layers/grid/mesh.d.mts +36 -15
  212. package/src/foundry/client/pixi/layers/masks/depth.d.mts +3 -3
  213. package/src/foundry/client/pixi/layers/masks/occlusion.d.mts +4 -4
  214. package/src/foundry/client/pixi/layers/masks/vision.d.mts +6 -6
  215. package/src/foundry/client/pixi/layers/placeables/drawings.d.mts +15 -11
  216. package/src/foundry/client/pixi/layers/placeables/lighting.d.mts +11 -10
  217. package/src/foundry/client/pixi/layers/placeables/notes.d.mts +47 -28
  218. package/src/foundry/client/pixi/layers/placeables/regions.d.mts +25 -12
  219. package/src/foundry/client/pixi/layers/placeables/sounds.d.mts +81 -63
  220. package/src/foundry/client/pixi/layers/placeables/templates.d.mts +10 -11
  221. package/src/foundry/client/pixi/layers/placeables/tiles.d.mts +28 -17
  222. package/src/foundry/client/pixi/layers/placeables/tokens.d.mts +67 -46
  223. package/src/foundry/client/pixi/layers/placeables/walls.d.mts +50 -51
  224. package/src/foundry/client/pixi/perception/clockwise-sweep.d.mts +22 -16
  225. package/src/foundry/client/pixi/perception/detection-mode.d.mts +123 -51
  226. package/src/foundry/client/pixi/perception/fog.d.mts +34 -19
  227. package/src/foundry/client/pixi/perception/perception-manager.d.mts +137 -137
  228. package/src/foundry/client/pixi/perception/vision-mode.d.mts +92 -67
  229. package/src/foundry/client/pixi/perception/weiler-atherton-clipping.d.mts +3 -3
  230. package/src/foundry/client/pixi/placeable.d.mts +241 -146
  231. package/src/foundry/client/pixi/placeables/drawing.d.mts +260 -134
  232. package/src/foundry/client/pixi/placeables/light.d.mts +204 -66
  233. package/src/foundry/client/pixi/placeables/note.d.mts +150 -55
  234. package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-canvas-object.d.mts +7 -6
  235. package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-graphics.d.mts +3 -3
  236. package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-occludable-object.d.mts +2 -2
  237. package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-sprite-mesh.d.mts +4 -4
  238. package/src/foundry/client/pixi/placeables/region.d.mts +219 -110
  239. package/src/foundry/client/pixi/placeables/sound.d.mts +211 -68
  240. package/src/foundry/client/pixi/placeables/template.d.mts +186 -100
  241. package/src/foundry/client/pixi/placeables/tile.d.mts +211 -142
  242. package/src/foundry/client/pixi/placeables/token.d.mts +911 -568
  243. package/src/foundry/client/pixi/placeables/wall.d.mts +253 -130
  244. package/src/foundry/client/pixi/webgl/extensions/batch-renderer.d.mts +27 -5
  245. package/src/foundry/client/pixi/webgl/extensions/batch-shader-generator.d.mts +3 -3
  246. package/src/foundry/client/pixi/webgl/helpers/framebuffer-snapshot.d.mts +3 -3
  247. package/src/foundry/client/pixi/webgl/helpers/smooth-noise.d.mts +13 -5
  248. package/src/foundry/client/pixi/webgl/helpers/texture-extractor.d.mts +6 -6
  249. package/src/foundry/client/pixi/webgl/shaders/base-shader-mixin.d.mts +2 -2
  250. package/src/foundry/client/pixi/webgl/shaders/base-shader.d.mts +5 -5
  251. package/src/foundry/client/pixi/webgl/shaders/filters/base-filter.d.mts +4 -4
  252. package/src/foundry/client/pixi/webgl/shaders/filters/base-mask-filter.d.mts +3 -3
  253. package/src/foundry/client/pixi/webgl/shaders/filters/blur.d.mts +5 -5
  254. package/src/foundry/client/pixi/webgl/shaders/filters/effects-masking.d.mts +6 -3
  255. package/src/foundry/client/pixi/webgl/shaders/filters/environment.d.mts +3 -3
  256. package/src/foundry/client/pixi/webgl/shaders/filters/glow-overlay.d.mts +4 -4
  257. package/src/foundry/client/pixi/webgl/shaders/filters/invisibility.d.mts +3 -3
  258. package/src/foundry/client/pixi/webgl/shaders/filters/outline-overlay.d.mts +4 -4
  259. package/src/foundry/client/pixi/webgl/shaders/filters/transition.d.mts +6 -6
  260. package/src/foundry/client/pixi/webgl/shaders/filters/visibility.d.mts +8 -5
  261. package/src/foundry/client/pixi/webgl/shaders/filters/vision-mask-filter.d.mts +3 -3
  262. package/src/foundry/client/pixi/webgl/shaders/filters/void.d.mts +3 -3
  263. package/src/foundry/client/pixi/webgl/shaders/filters/weather-occlusion-masks.d.mts +4 -4
  264. package/src/foundry/client/pixi/webgl/shaders/fragment-channel-mixin.d.mts +1 -1
  265. package/src/foundry/client/pixi/webgl/shaders/grid/grid.d.mts +4 -4
  266. package/src/foundry/client/pixi/webgl/shaders/lighting/background-lighting.d.mts +3 -3
  267. package/src/foundry/client/pixi/webgl/shaders/lighting/base-lighting.d.mts +3 -3
  268. package/src/foundry/client/pixi/webgl/shaders/lighting/coloration-lighting.d.mts +3 -3
  269. package/src/foundry/client/pixi/webgl/shaders/lighting/darkness-lighting.d.mts +3 -3
  270. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/bewitching-wave.d.mts +5 -5
  271. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/black-hole.d.mts +3 -3
  272. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/chroma.d.mts +3 -3
  273. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/emanation.d.mts +3 -3
  274. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/energy-field.d.mts +3 -3
  275. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/fairy-light.d.mts +6 -6
  276. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/flame.d.mts +5 -5
  277. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/fog.d.mts +3 -3
  278. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/force-grid.d.mts +3 -3
  279. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/ghost-light.d.mts +5 -5
  280. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/hexa-dome.d.mts +3 -3
  281. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/light-dome.d.mts +3 -3
  282. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/magical-gloom.d.mts +3 -3
  283. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/pulse.d.mts +5 -5
  284. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/radial-rainbow.d.mts +3 -3
  285. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/revolving-light.d.mts +3 -3
  286. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/roiling-mass.d.mts +3 -3
  287. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/siren-light.d.mts +5 -5
  288. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/smoke-patch.d.mts +6 -5
  289. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/star-light.d.mts +3 -3
  290. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/sunburst.d.mts +5 -5
  291. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/swirling-rainbow.d.mts +4 -3
  292. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/torch.d.mts +5 -5
  293. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/vortex.d.mts +5 -5
  294. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/wave.d.mts +5 -5
  295. package/src/foundry/client/pixi/webgl/shaders/lighting/illumination-lighting.d.mts +3 -3
  296. package/src/foundry/client/pixi/webgl/shaders/region/adjust-darkness-level.d.mts +7 -7
  297. package/src/foundry/client/pixi/webgl/shaders/region/base.d.mts +4 -4
  298. package/src/foundry/client/pixi/webgl/shaders/region/highlight.d.mts +3 -3
  299. package/src/foundry/client/pixi/webgl/shaders/samplers/base-sampler.d.mts +4 -4
  300. package/src/foundry/client/pixi/webgl/shaders/samplers/baseline-illumination.d.mts +3 -3
  301. package/src/foundry/client/pixi/webgl/shaders/samplers/color-adjustment.d.mts +5 -5
  302. package/src/foundry/client/pixi/webgl/shaders/samplers/depth.d.mts +3 -3
  303. package/src/foundry/client/pixi/webgl/shaders/samplers/fog-of-war.d.mts +3 -3
  304. package/src/foundry/client/pixi/webgl/shaders/samplers/occlusion.d.mts +3 -3
  305. package/src/foundry/client/pixi/webgl/shaders/samplers/primary.d.mts +4 -4
  306. package/src/foundry/client/pixi/webgl/shaders/samplers/token-ring.d.mts +4 -6
  307. package/src/foundry/client/pixi/webgl/shaders/vision/background-vision.d.mts +3 -3
  308. package/src/foundry/client/pixi/webgl/shaders/vision/base-vision.d.mts +3 -3
  309. package/src/foundry/client/pixi/webgl/shaders/vision/coloration-vision.d.mts +3 -3
  310. package/src/foundry/client/pixi/webgl/shaders/vision/effects/amplification.d.mts +3 -3
  311. package/src/foundry/client/pixi/webgl/shaders/vision/effects/wave.d.mts +5 -5
  312. package/src/foundry/client/pixi/webgl/shaders/vision/illumination-vision.d.mts +3 -3
  313. package/src/foundry/client/pixi/webgl/shaders/weather/base-weather.d.mts +14 -15
  314. package/src/foundry/client/pixi/webgl/shaders/weather/effect.d.mts +20 -27
  315. package/src/foundry/client/pixi/webgl/shaders/weather/fog.d.mts +5 -5
  316. package/src/foundry/client/pixi/webgl/shaders/weather/rain.d.mts +5 -5
  317. package/src/foundry/client/pixi/webgl/shaders/weather/snow.d.mts +5 -5
  318. package/src/foundry/client/pixi/workers/texture-worker.d.mts +5 -5
  319. package/src/foundry/client/tours/setup-tour.d.mts +15 -10
  320. package/src/foundry/client/ui/dialog.d.mts +3 -3
  321. package/src/foundry/client/ui/dragdrop.d.mts +33 -27
  322. package/src/foundry/client/ui/editor.d.mts +29 -21
  323. package/src/foundry/client/ui/filepicker.d.mts +42 -37
  324. package/src/foundry/client/ui/filter.d.mts +60 -48
  325. package/src/foundry/client/ui/forms.d.mts +22 -22
  326. package/src/foundry/client/ui/prosemirror.d.mts +15 -7
  327. package/src/foundry/client/ui/secrets.d.mts +43 -28
  328. package/src/foundry/client/ui/tabs.d.mts +40 -33
  329. package/src/foundry/client-esm/_module.d.mts +5 -5
  330. package/src/foundry/client-esm/_types.d.mts +2 -1
  331. package/src/foundry/client-esm/applications/api/application.d.mts +93 -31
  332. package/src/foundry/client-esm/applications/api/dialog.d.mts +23 -23
  333. package/src/foundry/client-esm/applications/api/document-sheet.d.mts +85 -32
  334. package/src/foundry/client-esm/applications/api/handlebars-application.d.mts +1 -1
  335. package/src/foundry/client-esm/applications/apps/av/camera-popout.d.mts +1 -1
  336. package/src/foundry/client-esm/applications/apps/av/cameras.d.mts +2 -2
  337. package/src/foundry/client-esm/applications/apps/compendium-art-config.d.mts +4 -5
  338. package/src/foundry/client-esm/applications/apps/file-picker.d.mts +2 -2
  339. package/src/foundry/client-esm/applications/apps/grid-config.d.mts +3 -3
  340. package/src/foundry/client-esm/applications/apps/image-popout.d.mts +1 -1
  341. package/src/foundry/client-esm/applications/apps/permission-config.d.mts +1 -1
  342. package/src/foundry/client-esm/applications/dice/roll-resolver.d.mts +4 -4
  343. package/src/foundry/client-esm/applications/elements/file-picker.d.mts +1 -1
  344. package/src/foundry/client-esm/applications/elements/prosemirror-editor.d.mts +1 -1
  345. package/src/foundry/client-esm/applications/hud/drawing-hud.d.mts +1 -1
  346. package/src/foundry/client-esm/applications/hud/tile-hud.d.mts +1 -1
  347. package/src/foundry/client-esm/applications/hud/token-hud.d.mts +1 -1
  348. package/src/foundry/client-esm/applications/sheets/active-effect-config.d.mts +3 -3
  349. package/src/foundry/client-esm/applications/sheets/actor-sheet.d.mts +2 -2
  350. package/src/foundry/client-esm/applications/sheets/adventure-exporter.d.mts +3 -3
  351. package/src/foundry/client-esm/applications/sheets/adventure-importer.d.mts +3 -3
  352. package/src/foundry/client-esm/applications/sheets/ambient-light-config.d.mts +5 -5
  353. package/src/foundry/client-esm/applications/sheets/ambient-sound-config.d.mts +4 -4
  354. package/src/foundry/client-esm/applications/sheets/card-config.d.mts +3 -3
  355. package/src/foundry/client-esm/applications/sheets/cards-config.d.mts +2 -2
  356. package/src/foundry/client-esm/applications/sheets/combatant-config.d.mts +3 -3
  357. package/src/foundry/client-esm/applications/sheets/drawing-config.d.mts +3 -3
  358. package/src/foundry/client-esm/applications/sheets/folder-config.d.mts +3 -3
  359. package/src/foundry/client-esm/applications/sheets/item-sheet.d.mts +2 -2
  360. package/src/foundry/client-esm/applications/sheets/journal/journal-entry-category-config.d.mts +3 -3
  361. package/src/foundry/client-esm/applications/sheets/journal/journal-entry-page-sheet.d.mts +3 -3
  362. package/src/foundry/client-esm/applications/sheets/journal/journal-entry-sheet.d.mts +3 -3
  363. package/src/foundry/client-esm/applications/sheets/macro-config.d.mts +3 -3
  364. package/src/foundry/client-esm/applications/sheets/note-config.d.mts +3 -3
  365. package/src/foundry/client-esm/applications/sheets/playlist-config.d.mts +3 -3
  366. package/src/foundry/client-esm/applications/sheets/playlist-sound-config.d.mts +3 -3
  367. package/src/foundry/client-esm/applications/sheets/region-behavior-config.d.mts +3 -3
  368. package/src/foundry/client-esm/applications/sheets/region-config.d.mts +3 -3
  369. package/src/foundry/client-esm/applications/sheets/roll-table-config.d.mts +3 -3
  370. package/src/foundry/client-esm/applications/sheets/roll-table-sheet.d.mts +3 -3
  371. package/src/foundry/client-esm/applications/sheets/scene-config.d.mts +3 -3
  372. package/src/foundry/client-esm/applications/sheets/table-result-config.d.mts +3 -3
  373. package/src/foundry/client-esm/applications/sheets/template-config.d.mts +3 -3
  374. package/src/foundry/client-esm/applications/sheets/tile-config.d.mts +3 -3
  375. package/src/foundry/client-esm/applications/sheets/token/mixin.d.mts +1 -0
  376. package/src/foundry/client-esm/applications/sheets/token/token-config.d.mts +3 -3
  377. package/src/foundry/client-esm/applications/sheets/user-config.d.mts +4 -4
  378. package/src/foundry/client-esm/applications/sheets/wall-config.d.mts +3 -3
  379. package/src/foundry/client-esm/applications/sidebar/apps/chat-popout.d.mts +1 -1
  380. package/src/foundry/client-esm/applications/sidebar/sidebar-tab.d.mts +2 -2
  381. package/src/foundry/client-esm/applications/sidebar/tabs/actor-directory.d.mts +1 -1
  382. package/src/foundry/client-esm/applications/sidebar/tabs/cards-directory.d.mts +1 -1
  383. package/src/foundry/client-esm/applications/sidebar/tabs/combat-tracker.d.mts +242 -1
  384. package/src/foundry/client-esm/applications/sidebar/tabs/item-directory.d.mts +1 -1
  385. package/src/foundry/client-esm/applications/sidebar/tabs/journal-directory.d.mts +1 -1
  386. package/src/foundry/client-esm/applications/sidebar/tabs/macro-directory.d.mts +1 -1
  387. package/src/foundry/client-esm/applications/sidebar/tabs/playlist-directory.d.mts +1 -1
  388. package/src/foundry/client-esm/applications/sidebar/tabs/roll-table-directory.d.mts +1 -1
  389. package/src/foundry/client-esm/applications/sidebar/tabs/scene-directory.d.mts +1 -1
  390. package/src/foundry/client-esm/applications/ui/region-legend.d.mts +2 -2
  391. package/src/foundry/client-esm/applications/ux/context-menu.d.mts +56 -36
  392. package/src/foundry/client-esm/audio/_types.d.mts +2 -0
  393. package/src/foundry/client-esm/audio/biquad.d.mts +76 -26
  394. package/src/foundry/client-esm/audio/cache.d.mts +31 -20
  395. package/src/foundry/client-esm/audio/convolver.d.mts +47 -25
  396. package/src/foundry/client-esm/audio/helper.d.mts +124 -80
  397. package/src/foundry/client-esm/audio/sound.d.mts +202 -97
  398. package/src/foundry/client-esm/audio/timeout.d.mts +28 -12
  399. package/src/foundry/client-esm/canvas/edges/collision.d.mts +12 -4
  400. package/src/foundry/client-esm/canvas/edges/edge.d.mts +13 -8
  401. package/src/foundry/client-esm/canvas/edges/edges.d.mts +3 -2
  402. package/src/foundry/client-esm/canvas/edges/vertex.d.mts +12 -10
  403. package/src/foundry/client-esm/canvas/regions/geometry.d.mts +14 -7
  404. package/src/foundry/client-esm/canvas/regions/mesh.d.mts +25 -14
  405. package/src/foundry/client-esm/canvas/regions/polygon-tree.d.mts +50 -19
  406. package/src/foundry/client-esm/canvas/regions/shape.d.mts +45 -34
  407. package/src/foundry/client-esm/canvas/scene-manager.d.mts +7 -6
  408. package/src/foundry/client-esm/canvas/smaa/blend.d.mts +14 -3
  409. package/src/foundry/client-esm/canvas/smaa/edges.d.mts +25 -3
  410. package/src/foundry/client-esm/canvas/smaa/smaa.d.mts +119 -20
  411. package/src/foundry/client-esm/canvas/smaa/weights.d.mts +26 -3
  412. package/src/foundry/client-esm/canvas/sources/base-effect-source.d.mts +69 -39
  413. package/src/foundry/client-esm/canvas/sources/base-light-source.d.mts +66 -40
  414. package/src/foundry/client-esm/canvas/sources/global-light-source.d.mts +78 -19
  415. package/src/foundry/client-esm/canvas/sources/point-darkness-source.d.mts +37 -20
  416. package/src/foundry/client-esm/canvas/sources/point-effect-source.d.mts +39 -20
  417. package/src/foundry/client-esm/canvas/sources/point-light-source.d.mts +41 -12
  418. package/src/foundry/client-esm/canvas/sources/point-movement-source.d.mts +15 -4
  419. package/src/foundry/client-esm/canvas/sources/point-sound-source.d.mts +29 -14
  420. package/src/foundry/client-esm/canvas/sources/point-vision-source.d.mts +84 -39
  421. package/src/foundry/client-esm/canvas/sources/rendered-effect-source.d.mts +115 -41
  422. package/src/foundry/client-esm/canvas/tokens/ring-config.d.mts +83 -21
  423. package/src/foundry/client-esm/canvas/tokens/ring-data.d.mts +66 -93
  424. package/src/foundry/client-esm/canvas/tokens/ring.d.mts +146 -51
  425. package/src/foundry/client-esm/client.d.mts +16 -16
  426. package/src/foundry/client-esm/data/_module.d.mts +1 -1
  427. package/src/foundry/client-esm/data/calendar.d.mts +26 -39
  428. package/src/foundry/client-esm/data/client-backend.d.mts +6 -6
  429. package/src/foundry/client-esm/data/region-behaviors/adjust-darkness-level.d.mts +1 -1
  430. package/src/foundry/client-esm/data/region-behaviors/base.d.mts +5 -5
  431. package/src/foundry/client-esm/data/region-behaviors/display-scrolling-text.d.mts +2 -2
  432. package/src/foundry/client-esm/data/terrain-data.d.mts +1 -1
  433. package/src/foundry/client-esm/dice/parser.d.mts +5 -27
  434. package/src/foundry/client-esm/dice/roll.d.mts +63 -80
  435. package/src/foundry/client-esm/dice/terms/coin.d.mts +4 -8
  436. package/src/foundry/client-esm/dice/terms/dice.d.mts +85 -64
  437. package/src/foundry/client-esm/dice/terms/die.d.mts +7 -7
  438. package/src/foundry/client-esm/dice/terms/fate.d.mts +5 -5
  439. package/src/foundry/client-esm/dice/terms/function.d.mts +13 -16
  440. package/src/foundry/client-esm/dice/terms/numeric.d.mts +2 -4
  441. package/src/foundry/client-esm/dice/terms/operator.d.mts +1 -1
  442. package/src/foundry/client-esm/dice/terms/parenthetical.d.mts +8 -9
  443. package/src/foundry/client-esm/dice/terms/pool.d.mts +13 -28
  444. package/src/foundry/client-esm/dice/terms/string.d.mts +3 -3
  445. package/src/foundry/client-esm/dice/terms/term.d.mts +10 -5
  446. package/src/foundry/client-esm/dice/twister.d.mts +3 -3
  447. package/src/foundry/client-esm/documents/_module.d.mts +1 -1
  448. package/src/foundry/client-esm/helpers/_types.d.mts +12 -46
  449. package/src/foundry/client-esm/helpers/compendium-art.d.mts +57 -4
  450. package/src/foundry/client-esm/packages/_module.d.mts +1 -1
  451. package/src/foundry/client-esm/packages/_types.d.mts +2 -0
  452. package/src/foundry/client-esm/utils/_module.d.mts +1 -1
  453. package/src/foundry/client-esm/utils/_types.d.mts +2 -1
  454. package/src/foundry/common/_types.d.mts +1 -1
  455. package/src/foundry/common/abstract/_module.d.mts +1 -0
  456. package/src/foundry/common/abstract/_types.d.mts +60 -54
  457. package/src/foundry/common/abstract/backend.d.mts +28 -16
  458. package/src/foundry/common/abstract/data.d.mts +133 -116
  459. package/src/foundry/common/abstract/document.d.mts +1233 -440
  460. package/src/foundry/common/abstract/embedded-collection.d.mts +2 -2
  461. package/src/foundry/common/abstract/singleton-collection.d.mts +1 -1
  462. package/src/foundry/common/abstract/type-data.d.mts +35 -43
  463. package/src/foundry/common/config.d.mts +3 -3
  464. package/src/foundry/common/constants.d.mts +27 -26
  465. package/src/foundry/common/data/_types.d.mts +2 -0
  466. package/src/foundry/common/data/data.d.mts +189 -87
  467. package/src/foundry/common/data/fields.d.mts +579 -258
  468. package/src/foundry/common/data/validation-failure.d.mts +9 -4
  469. package/src/foundry/common/documents/_types.d.mts +16 -9
  470. package/src/foundry/common/documents/active-effect.d.mts +280 -180
  471. package/src/foundry/common/documents/actor-delta.d.mts +317 -70
  472. package/src/foundry/common/documents/actor.d.mts +304 -103
  473. package/src/foundry/common/documents/adventure.d.mts +254 -140
  474. package/src/foundry/common/documents/ambient-light.d.mts +267 -76
  475. package/src/foundry/common/documents/ambient-sound.d.mts +267 -110
  476. package/src/foundry/common/documents/card.d.mts +267 -176
  477. package/src/foundry/common/documents/cards.d.mts +299 -128
  478. package/src/foundry/common/documents/chat-message.d.mts +276 -160
  479. package/src/foundry/common/documents/combat.d.mts +300 -91
  480. package/src/foundry/common/documents/combatant.d.mts +283 -88
  481. package/src/foundry/common/documents/drawing.d.mts +286 -207
  482. package/src/foundry/common/documents/fog-exploration.d.mts +258 -72
  483. package/src/foundry/common/documents/folder.d.mts +248 -85
  484. package/src/foundry/common/documents/item.d.mts +305 -101
  485. package/src/foundry/common/documents/journal-entry-page.d.mts +279 -190
  486. package/src/foundry/common/documents/journal-entry.d.mts +294 -70
  487. package/src/foundry/common/documents/macro.d.mts +254 -134
  488. package/src/foundry/common/documents/measured-template.d.mts +293 -137
  489. package/src/foundry/common/documents/note.d.mts +274 -151
  490. package/src/foundry/common/documents/playlist-sound.d.mts +260 -96
  491. package/src/foundry/common/documents/playlist.d.mts +279 -122
  492. package/src/foundry/common/documents/region-behavior.d.mts +305 -64
  493. package/src/foundry/common/documents/region.d.mts +309 -90
  494. package/src/foundry/common/documents/roll-table.d.mts +286 -104
  495. package/src/foundry/common/documents/scene.d.mts +276 -344
  496. package/src/foundry/common/documents/setting.d.mts +229 -55
  497. package/src/foundry/common/documents/table-result.d.mts +267 -96
  498. package/src/foundry/common/documents/tile.d.mts +301 -172
  499. package/src/foundry/common/documents/token.d.mts +350 -452
  500. package/src/foundry/common/documents/user.d.mts +256 -146
  501. package/src/foundry/common/documents/wall.d.mts +272 -157
  502. package/src/foundry/common/grid/_types.d.mts +2 -0
  503. package/src/foundry/common/grid/base.d.mts +58 -37
  504. package/src/foundry/common/grid/hexagonal.d.mts +19 -19
  505. package/src/foundry/common/grid/square.d.mts +1 -1
  506. package/src/foundry/common/packages/_module.d.mts +5 -5
  507. package/src/foundry/common/packages/_types.d.mts +2 -0
  508. package/src/foundry/common/packages/base-module.d.mts +6 -24
  509. package/src/foundry/common/packages/base-package.d.mts +18 -16
  510. package/src/foundry/common/packages/base-system.d.mts +6 -78
  511. package/src/foundry/common/packages/base-world.d.mts +7 -60
  512. package/src/foundry/common/packages/sub-types.d.mts +1 -1
  513. package/src/foundry/common/primitives/array.d.mts +3 -3
  514. package/src/foundry/common/primitives/math.d.mts +7 -1
  515. package/src/foundry/common/primitives/number.d.mts +1 -1
  516. package/src/foundry/common/primitives/set.d.mts +17 -14
  517. package/src/foundry/common/prosemirror/_types.d.mts +2 -0
  518. package/src/foundry/common/prosemirror/dropdown.d.mts +1 -1
  519. package/src/foundry/common/prosemirror/highlight-matches-plugin.d.mts +1 -1
  520. package/src/foundry/common/prosemirror/menu.d.mts +3 -3
  521. package/src/foundry/common/prosemirror/plugin.d.mts +1 -1
  522. package/src/foundry/common/prosemirror/schema/index.d.mts +0 -1
  523. package/src/foundry/common/prosemirror/util.d.mts +1 -1
  524. package/src/foundry/common/utils/bitmask.d.mts +4 -1
  525. package/src/foundry/common/utils/collection.d.mts +59 -24
  526. package/src/foundry/common/utils/event-emitter.d.mts +46 -19
  527. package/src/foundry/common/utils/helpers.d.mts +13 -13
  528. package/src/foundry/common/utils/http.d.mts +2 -2
  529. package/src/foundry/common/utils/string-tree.d.mts +45 -39
  530. package/src/foundry/common/utils/word-tree.d.mts +10 -23
  531. package/src/tsconfig.json +1 -5
  532. package/src/types/augments/pixi.d.mts +28 -28
  533. package/src/types/config.d.mts +12 -12
  534. package/src/types/documentConfiguration.d.mts +282 -597
  535. package/src/types/lib.d.mts +4 -4
  536. package/src/types/workers/image-compressor.d.mts +1 -1
  537. package/src/utils/index.d.mts +255 -60
  538. package/tsconfig.json +29 -0
  539. package/tsconfig.main.json +8 -0
  540. package/tsconfig.miscellaneous.json +16 -0
  541. package/src/foundry/client/apps/placeables/light-config.d.mts +0 -100
  542. package/src/foundry/client/apps/placeables/sound-config.d.mts +0 -44
  543. package/src/foundry/common/documents/module.d.mts +0 -35
@@ -5,16 +5,18 @@ import type {
5
5
  EmptyObject,
6
6
  NullishProps,
7
7
  InexactPartial,
8
- ToMethod,
9
8
  FixedInstanceType,
10
- } from "../../../utils/index.d.mts";
9
+ Identity,
10
+ PrettifyType,
11
+ InterfaceToObject,
12
+ AnyArray,
13
+ } from "fvtt-types/utils";
11
14
  import type { DataModel } from "../abstract/data.mts";
12
15
  import type Document from "../abstract/document.mts";
13
16
  import type { EmbeddedCollection, EmbeddedCollectionDelta, TypeDataModel } from "../abstract/_module.d.mts";
14
17
  import type { DOCUMENT_OWNERSHIP_LEVELS } from "../constants.d.mts";
15
- import type { CONST } from "../../client-esm/client.d.mts";
18
+ import type { CONST } from "#client-esm/client.d.mts";
16
19
  import type { DataModelValidationFailure } from "./validation-failure.mts";
17
- import type { EffectChangeData } from "../documents/_types.d.mts";
18
20
  import type {
19
21
  FormGroupConfig,
20
22
  FormInputConfig,
@@ -22,7 +24,7 @@ import type {
22
24
  MultiSelectInputConfig,
23
25
  SelectInputConfig,
24
26
  TextAreaInputConfig,
25
- } from "../../client-esm/applications/forms/fields.d.mts";
27
+ } from "#client-esm/applications/forms/fields.d.mts";
26
28
 
27
29
  export type DataSchema = Record<string, DataField.Any>;
28
30
 
@@ -41,6 +43,7 @@ export type DataSchema = Record<string, DataField.Any>;
41
43
  */
42
44
  declare abstract class DataField<
43
45
  const Options extends DataField.Options.Any = DataField.DefaultOptions,
46
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
44
47
  const AssignmentType = DataField.AssignmentType<Options>,
45
48
  const InitializedType = DataField.InitializedType<Options>,
46
49
  const PersistedType = InitializedType,
@@ -53,6 +56,15 @@ declare abstract class DataField<
53
56
  */
54
57
  constructor(options?: Options, context?: DataField.Context);
55
58
 
59
+ /** @internal */
60
+ " __fvtt_types_internal_source_data": PersistedType;
61
+
62
+ /** @internal */
63
+ " __fvtt_types_internal_assignment_data": AssignmentType;
64
+
65
+ /** @internal */
66
+ " __fvtt_types_internal_initialized_data": InitializedType;
67
+
56
68
  /** The initially provided options which configure the data field */
57
69
  options: Options;
58
70
 
@@ -415,13 +427,16 @@ declare abstract class DataField<
415
427
 
416
428
  declare namespace DataField {
417
429
  /** Any DataField. */
418
- type Any = DataField<DataField.Options.Any, unknown, unknown, unknown>;
419
-
420
- type AnyConstructor = typeof AnyDataField;
430
+ interface Any extends AnyDataField {}
431
+ interface AnyConstructor extends Identity<typeof AnyDataField> {}
421
432
 
422
433
  /** A DataField with unknown inner types. */
423
434
  type Unknown = DataField<any, unknown, unknown, unknown>;
424
435
 
436
+ /**
437
+ * @deprecated - AssignmentType is being deprecated. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
438
+ * for more details.
439
+ */
425
440
  type AssignmentTypeFor<ConcreteDataField extends Any> =
426
441
  ConcreteDataField extends DataField<any, infer AssignmentType, any, any> ? AssignmentType : never;
427
442
 
@@ -431,7 +446,7 @@ declare namespace DataField {
431
446
  type PersistedTypeFor<ConcreteDataField extends Any> =
432
447
  ConcreteDataField extends DataField<any, any, any, infer PersistedType> ? PersistedType : never;
433
448
 
434
- /** The type of the default options for the {@link DataField} class. */
449
+ /** The type of the default options for the {@link DataField | `DataField`} class. */
435
450
  interface DefaultOptions {
436
451
  required: false;
437
452
  nullable: false;
@@ -465,12 +480,14 @@ declare namespace DataField {
465
480
  /** The initial value of a field, or a function which assigns that initial value. */
466
481
  initial?:
467
482
  | DataField.Options.InitialType<
468
- DataField.Options.InitialReturnType<BaseAssignmentType, this["nullable"], this["required"]>
483
+ // TODO(LukeAbby): Add a `ValidateOptions` type or something of that sort in order to
484
+ // catch incorrect initial types.
485
+ DataField.Options.InitialReturnType<BaseAssignmentType, boolean, boolean>
469
486
  >
470
487
  | undefined;
471
488
 
472
489
  /** A data validation function which accepts one argument with the current value. */
473
- validate?: DataField.Validator<BaseAssignmentType> | undefined;
490
+ validate?: DataField.Validator<DataField.Any, BaseAssignmentType> | undefined;
474
491
 
475
492
  /** A localizable label displayed on forms which render this field. */
476
493
  label?: string | undefined;
@@ -490,19 +507,19 @@ declare namespace DataField {
490
507
  namespace Options {
491
508
  /** Any DataField.Options. */
492
509
  // Note(LukeAbby): This `& object` is intentional. Its purpose is to allow options like `{ integer: true }` to be assigned.
493
- // This is an issue because `{ integer: true }` does not extend `{ required?: boolean }` because they have properties in common.
510
+ // This is an issue because `{ integer: true }` does not extend `{ required?: boolean }` because they have no properties in common.
494
511
  // Even though `{ integer: true, required: undefined }` would extend `{ required?: boolean }` following the regular rules of surplus properties being allowed.
495
- // `object` was chosen over `AnyObject` so that people may pass in interfa
496
- type Any = DataField.Options<any> & object;
512
+ // `object` was chosen over `AnyObject` so that people may pass in interfaces.
513
+ interface Any extends DataField.Options<any>, Identity<object> {}
497
514
 
498
515
  /**
499
- * A helper type for the {@link DataField.Options.initial} option.
516
+ * A helper type for the {@link DataField.Options.initial | `DataField.Options.initial`} option.
500
517
  * @typeParam ReturnType - the return type of the option
501
518
  */
502
519
  type InitialType<ReturnType> = ReturnType | ((initialData: unknown) => ReturnType);
503
520
 
504
521
  /**
505
- * The decorated return type for the {@link DataField.Options.initial} option.
522
+ * The decorated return type for the {@link DataField.Options.initial | `DataField.Options.initial`} option.
506
523
  * @typeParam BaseAssignmentType - the base assignment type for a DataField
507
524
  * @typeParam NullableOption - the value of the nullable option
508
525
  * @typeParam RequiredOption - the value of the required option
@@ -541,6 +558,9 @@ declare namespace DataField {
541
558
  * A type to decorate the base assignment type to a DataField, based on the options of the field.
542
559
  * @typeParam BaseAssignmentType - the base assignment type of the DataField, without null or undefined
543
560
  * @typeParam Options - the options of the DataField
561
+ *
562
+ * @deprecated - This type is being phased out alongside the entirety of the concept of the
563
+ * `Assignment` type.
544
564
  */
545
565
  type DerivedAssignmentType<BaseAssignmentType, Options extends DataField.Options.Any> =
546
566
  | Exclude<BaseAssignmentType, null | undefined> // Always include the base type
@@ -580,7 +600,11 @@ declare namespace DataField {
580
600
  /**
581
601
  * A shorthand for the assignment type of a DataField class.
582
602
  * @typeParam Options - the options overriding the defaults
603
+ *
604
+ * @deprecated - AssignmentData is being phased out. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
605
+ * for more details.
583
606
  */
607
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
584
608
  type AssignmentType<Options extends DataField.Options.Any> = DerivedAssignmentType<any, MergedOptions<Options>>;
585
609
 
586
610
  /**
@@ -589,7 +613,7 @@ declare namespace DataField {
589
613
  */
590
614
  type InitializedType<Options extends DataField.Options.Any> = DerivedInitializedType<any, MergedOptions<Options>>;
591
615
 
592
- /** An interface for the options of the {@link DataField} clean functions. */
616
+ /** An interface for the options of the {@link DataField | `DataField`} clean functions. */
593
617
  interface CleanOptions {
594
618
  /** Whether to perform partial cleaning? */
595
619
  partial?: boolean;
@@ -611,22 +635,37 @@ declare namespace DataField {
611
635
  *
612
636
  * An Error may be thrown which provides a custom error message explaining the reason the value is invalid.
613
637
  */
614
- type Validator<BaseAssignmentType> = ToMethod<
615
- (
616
- this: DataField,
617
- // TODO(LukeAbby): Always allowing `null | undefined` may be too lenient but it's probably the best type for the time being.
618
- value: BaseAssignmentType | null | undefined,
619
- options: ValidationOptions<DataField>,
620
- ) => DataModelValidationFailure | boolean | void
621
- >;
638
+ type Validator<CurrentField extends DataField.Any, BaseAssignmentType> =
639
+ | {
640
+ validate(
641
+ this: CurrentField,
642
+ value: unknown,
643
+ options: ValidationOptions<CurrentField>,
644
+ ): value is BaseAssignmentType;
645
+ }["validate"]
646
+ | {
647
+ validate(
648
+ this: CurrentField,
649
+ value: unknown,
650
+ options: ValidationOptions<CurrentField>,
651
+ ): asserts value is BaseAssignmentType;
652
+ }["validate"]
653
+ | {
654
+ validate(
655
+ this: CurrentField,
656
+ value: unknown,
657
+ options: ValidationOptions<CurrentField>,
658
+ ): DataModelValidationFailure | boolean | void;
659
+ }["validate"];
622
660
 
623
661
  /**
624
- * An interface for the options of the {@link DataField} validation functions.
625
- * @typeParam DataField - the type of the DataField, which is the receiver of the validate function
662
+ * An interface for the options of the {@link DataField | `DataField`} validation functions.
663
+ * @typeParam CurrentField - the type of the DataField, which is the receiver of the validate function
626
664
  */
627
- interface ValidationOptions<DataField extends DataField.Any> extends DataValidationOptions {
665
+ interface ValidationOptions<CurrentField extends DataField.Any> extends DataValidationOptions {
628
666
  source?: AnyObject;
629
- validate?: Validator<DataField.AssignmentTypeFor<DataField>>;
667
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
668
+ validate?: Validator<CurrentField, DataField.AssignmentTypeFor<CurrentField>>;
630
669
  }
631
670
 
632
671
  interface Context {
@@ -658,11 +697,11 @@ declare namespace DataField {
658
697
  }
659
698
 
660
699
  declare abstract class AnyDataField extends DataField<any, any, any, any> {
661
- constructor(arg0: never, ...args: never[]);
700
+ constructor(...args: never);
662
701
  }
663
702
 
664
703
  /**
665
- * A special class of {@link DataField} which defines a data schema.
704
+ * A special class of {@link DataField | `DataField`} which defines a data schema.
666
705
  * @typeParam Fields - the DataSchema fields of the SchemaField
667
706
  * @typeParam Options - the options of the SchemaField instance
668
707
  * @typeParam AssignmentType - the type of the allowed assignment values of the SchemaField
@@ -677,9 +716,10 @@ declare abstract class AnyDataField extends DataField<any, any, any, any> {
677
716
  declare class SchemaField<
678
717
  Fields extends DataSchema,
679
718
  Options extends SchemaField.Options<Fields> = SchemaField.DefaultOptions,
680
- AssignmentType = SchemaField.AssignmentType<Fields, SimpleMerge<Options, SchemaField.DefaultOptions>>,
681
- InitializedType = SchemaField.InitializedType<Fields, SimpleMerge<Options, SchemaField.DefaultOptions>>,
682
- PersistedType extends AnyObject | null | undefined = SchemaField.PersistedType<
719
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
720
+ AssignmentType = SchemaField.Internal.AssignmentType<Fields, SimpleMerge<Options, SchemaField.DefaultOptions>>,
721
+ InitializedType = SchemaField.Internal.InitializedType<Fields, SimpleMerge<Options, SchemaField.DefaultOptions>>,
722
+ PersistedType extends AnyObject | null | undefined = SchemaField.Internal.PersistedType<
683
723
  Fields,
684
724
  SimpleMerge<Options, SchemaField.DefaultOptions>
685
725
  >,
@@ -799,7 +839,7 @@ declare class SchemaField<
799
839
  }
800
840
 
801
841
  // FIXME(LukeAbby): This is a quick patch that avoids issues with the fact that the `initial` in `SchemaField` is not actually assignable to its assignment type etc.
802
- // This will be superceded once proper field treatment is applied.
842
+ // This will be superseded once proper field treatment is applied.
803
843
  declare const __SchemaFieldInitialSymbol: unique symbol;
804
844
 
805
845
  type __SchemaFieldInitial = typeof __SchemaFieldInitialSymbol;
@@ -809,66 +849,112 @@ declare namespace SchemaField {
809
849
  * A shorthand for the options of a SchemaField class.
810
850
  * @typeParam Fields - the DataSchema fields of the SchemaField
811
851
  */
812
- type Options<Fields extends DataSchema> = DataField.Options<InnerAssignmentType<Fields> | __SchemaFieldInitial>;
852
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
853
+ type Options<Fields extends DataSchema> = DataField.Options<AssignmentData<Fields> | __SchemaFieldInitial>;
813
854
 
814
855
  /** Any SchemaField. */
815
- type Any = SchemaField<any, any, any, any, any>;
856
+ interface Any extends SchemaField<any, any, any, any, any> {}
816
857
 
817
858
  /**
818
859
  * Get the constructor type for the given DataSchema.
819
860
  * @typeParam Fields - the DataSchema fields of the SchemaField
820
861
  */
821
- type InnerConstructorType<Fields extends DataSchema> = InnerAssignmentType<Fields>;
862
+ // Note(LukeAbby): Currently this is identical to the assignment type. The intent is to make this
863
+ // More accurate in the future, e.g. requiring some requisite properties instead of always being
864
+ // optional. This does mean the deprecation of `AssignmentData` is a "lie"
865
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
866
+ type CreateData<Fields extends DataSchema> = AssignmentData<Fields>;
822
867
 
823
868
  /**
824
869
  * Get the inner assignment type for the given DataSchema.
825
870
  * @typeParam Fields - the DataSchema fields of the SchemaField
826
- */
827
- type InnerAssignmentType<Fields extends DataSchema> = RemoveIndexSignatures<{
828
- [Key in keyof Fields]?: Fields[Key] extends EmbeddedDataField<any, any, infer AssignmentType, any, any>
829
- ? AssignmentType
830
- : Fields[Key] extends SchemaField<infer SubSchema, any, any, any, any>
831
- ? // FIXME(LukeAbby): This is a quick hack into InnerAssignmentType that assumes that the `initial` of `SchemaField` is not changed from the default of `{}`
832
- // This will be fixed with the refactoring of the types
833
- EmptyObject extends InnerAssignmentType<SubSchema>
834
- ? InnerAssignmentType<SubSchema> | undefined | null
835
- : InnerAssignmentType<SubSchema>
836
- : Fields[Key] extends DataField<any, infer AssignType, any, any>
837
- ? AssignType
838
- : never;
839
- }>;
871
+ *
872
+ * @deprecated This type is a relic of the early days of data models. It was meant to represent
873
+ * the types that would be valid for the expression `this.schemaProperty = ...`. Modern users will
874
+ * recognize that the only sane thing to do here is to use `InitializedData` but when data models
875
+ * were first being introduced there was an attempt to support a sort of strange compromise between
876
+ * `InitializedData`, `SourceData`, and even `CreateData` for backwards compatability with existing patterns.
877
+ *
878
+ * You should instead use those types as appropriate.
879
+ */
880
+ type AssignmentData<Fields extends DataSchema> = PrettifyType<
881
+ RemoveIndexSignatures<{
882
+ [Key in keyof Fields]?: Fields[Key] extends EmbeddedDataField<any, any, infer AssignmentType, any, any>
883
+ ? AssignmentType
884
+ : Fields[Key] extends SchemaField<infer SubSchema, any, any, any, any>
885
+ ? // FIXME(LukeAbby): This is a quick hack into AssignmentData that assumes that the `initial` of `SchemaField` is not changed from the default of `{}`
886
+ // This will be fixed with the refactoring of the types
887
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
888
+ EmptyObject extends AssignmentData<SubSchema>
889
+ ? // eslint-disable-next-line @typescript-eslint/no-deprecated
890
+ AssignmentData<SubSchema> | undefined | null
891
+ : // eslint-disable-next-line @typescript-eslint/no-deprecated
892
+ AssignmentData<SubSchema>
893
+ : Fields[Key] extends DataField<any, infer AssignType, any, any>
894
+ ? AssignType
895
+ : never;
896
+ }>
897
+ >;
840
898
 
841
- type InnerUpdateData<Fields extends DataSchema> = InnerAssignmentType<Fields>;
899
+ /**
900
+ * The required type of data used when updating a document.
901
+ * @typeParam Fields - the DataSchema fields of the SchemaField
902
+ */
903
+ // Note(LukeAbby): Currently this is identical to `AssignmentData` but the intent is to make it
904
+ // more accurate in the future.
905
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
906
+ type UpdateData<Fields extends DataSchema> = AssignmentData<Fields>;
842
907
 
843
908
  /**
844
- * Get the inner initialized type for the given DataSchema.
909
+ * Gets the initialized version of a schema. This means a
845
910
  * @typeParam Fields - the DataSchema fields of the SchemaField
846
911
  */
847
- type InnerInitializedType<Fields extends DataSchema> = RemoveIndexSignatures<{
848
- [Key in keyof Fields]: Fields[Key] extends EmbeddedDataField<infer Model, any, any, any, any>
849
- ? FixedInstanceType<Model>
850
- : Fields[Key] extends SchemaField<infer SubSchema, any, any, any, any>
851
- ? InnerInitializedType<SubSchema>
852
- : Fields[Key] extends DataField<any, any, infer InitType, any>
853
- ? InitType
854
- : never;
855
- }>;
912
+ type InitializedData<Fields extends DataSchema> = PrettifyType<
913
+ RemoveIndexSignatures<{
914
+ [Key in keyof Fields]: Fields[Key] extends EmbeddedDataField<infer Model, any, any, any, any>
915
+ ? FixedInstanceType<Model>
916
+ : Fields[Key] extends SchemaField<infer SubSchema, any, any, any, any>
917
+ ? InitializedData<SubSchema>
918
+ : Fields[Key] extends DataField<any, any, infer InitType, any>
919
+ ? InitType
920
+ : never;
921
+ }>
922
+ >;
856
923
 
857
924
  /**
858
- * Get the inner persisted type for the given DataSchema.
925
+ * @deprecated {@link SourceData | `SourceData`}
926
+ */
927
+ type PersistedData<Fields extends DataSchema> = SourceData<Fields>;
928
+
929
+ /**
930
+ * Get the persisted type for the given DataSchema. This is the type used for source.
859
931
  * @typeParam Fields - the DataSchema fields of the SchemaField
860
932
  */
861
- type InnerPersistedType<Fields extends DataSchema> = RemoveIndexSignatures<{
862
- [Key in keyof Fields]: Fields[Key] extends EmbeddedDataField<any, any, any, any, infer PersistType>
863
- ? PersistType
864
- : Fields[Key] extends SchemaField<infer SubSchema, any, any, any, any>
865
- ? InnerPersistedType<SubSchema>
866
- : Fields[Key] extends DataField<any, any, any, infer PersistType>
867
- ? PersistType
868
- : never;
869
- }>;
870
-
871
- /** The type of the default options for the {@link SchemaField} class. */
933
+ type SourceData<Fields extends DataSchema> = PrettifyType<
934
+ RemoveIndexSignatures<{
935
+ [Key in keyof Fields]: Fields[Key] extends EmbeddedDataField<any, any, any, any, infer PersistType>
936
+ ? PersistType
937
+ : Fields[Key] extends SchemaField<infer SubSchema, any, any, any, any>
938
+ ? SourceData<SubSchema>
939
+ : Fields[Key] extends DataField<any, any, any, infer PersistType>
940
+ ? PersistType
941
+ : never;
942
+ }>
943
+ >;
944
+
945
+ type UpdateSourceData<Fields extends DataSchema> = PrettifyType<
946
+ RemoveIndexSignatures<{
947
+ [Key in keyof Fields]: Fields[Key] extends EmbeddedDataField<any, any, any, any, infer PersistType>
948
+ ? PersistType
949
+ : Fields[Key] extends SchemaField<infer SubSchema, any, any, any, any>
950
+ ? SourceData<SubSchema>
951
+ : Fields[Key] extends DataField<any, any, any, infer PersistType>
952
+ ? PersistType
953
+ : never;
954
+ }>
955
+ >;
956
+
957
+ /** The type of the default options for the {@link SchemaField | `SchemaField`} class. */
872
958
  type DefaultOptions = SimpleMerge<
873
959
  DataField.DefaultOptions,
874
960
  {
@@ -885,40 +971,114 @@ declare namespace SchemaField {
885
971
  */
886
972
  type MergedOptions<Fields extends DataSchema, Opts extends Options<Fields>> = SimpleMerge<DefaultOptions, Opts>;
887
973
 
888
- // FIXME: null or undefined should be permissible, cast as the initialized type
974
+ // These exist for calculating the type of schema field with options.
975
+ // This will be deleted once fields are refactored.
976
+ // The names are also confusing. Hence these it's put into `Internal.
977
+ namespace Internal {
978
+ // FIXME: null or undefined should be permissible, cast as the initialized type
979
+ /**
980
+ * A shorthand for the assignment type of a SchemaField class.
981
+ * @typeParam Fields - the DataSchema fields of the SchemaField
982
+ * @typeParam Opts - the options that override the default options
983
+ *
984
+ * @deprecated This type is a relic of the early days of data models. It was meant to represent
985
+ * the types that would be valid for the expression `this.schemaProperty = ...`. Modern users will
986
+ * recognize that the only sane thing to do here is to use `InitializedType` but when data models
987
+ * were first being introduced there was an attempt to support a sort of strange compromise between
988
+ * `InitializedType`, `SourceType`, and even `CreateType` to an extent.
989
+ *
990
+ * You should instead use those types as appropriate.
991
+ */
992
+ type AssignmentType<
993
+ Fields extends DataSchema,
994
+ Opts extends Options<Fields> = DefaultOptions,
995
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
996
+ > = DataField.DerivedAssignmentType<AssignmentData<Fields>, MergedOptions<Fields, Opts>>;
997
+
998
+ /**
999
+ * A shorthand for the assignment type of a SchemaField class.
1000
+ * @typeParam Fields - the DataSchema fields of the SchemaField
1001
+ * @typeParam Opts - the options that override the default options
1002
+ */
1003
+ type InitializedType<
1004
+ Fields extends DataSchema,
1005
+ Opts extends Options<Fields> = DefaultOptions,
1006
+ > = DataField.DerivedInitializedType<InitializedData<Fields>, MergedOptions<Fields, Opts>>;
1007
+
1008
+ /**
1009
+ * A shorthand for the assignment type of a SchemaField class.
1010
+ * @typeParam Fields - the DataSchema fields of the SchemaField
1011
+ * @typeParam Opts - the options that override the default options
1012
+ */
1013
+ type PersistedType<
1014
+ Fields extends DataSchema,
1015
+ Opts extends Options<Fields> = DefaultOptions,
1016
+ > = DataField.DerivedInitializedType<SourceData<Fields>, MergedOptions<Fields, Opts>>;
1017
+ }
1018
+
889
1019
  /**
890
- * A shorthand for the assignment type of a SchemaField class.
891
- * @typeParam Fields - the DataSchema fields of the SchemaField
892
- * @typeParam Opts - the options that override the default options
1020
+ * This is deprecated because of likely confusion between `SchemaField.AssignmentData` and `SchemaField.AssignmentType`.
1021
+ * @deprecated {@link SchemaField.Internal.AssignmentType | `SchemaField.Internal.AssignmentType`}
893
1022
  */
894
1023
  type AssignmentType<
895
1024
  Fields extends DataSchema,
896
1025
  Opts extends Options<Fields> = DefaultOptions,
897
- > = DataField.DerivedAssignmentType<InnerAssignmentType<Fields>, MergedOptions<Fields, Opts>>;
1026
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
1027
+ > = Internal.AssignmentType<Fields, Opts>;
898
1028
 
899
1029
  /**
900
- * A shorthand for the assignment type of a SchemaField class.
901
- * @typeParam Fields - the DataSchema fields of the SchemaField
902
- * @typeParam Opts - the options that override the default options
1030
+ * This is deprecated because of likely confusion between `SchemaField.InitializedData` and `SchemaField.InitializedType`.
1031
+ * @deprecated {@link SchemaField.Internal.InitializedType | `SchemaField.Internal.InitializedType`}
903
1032
  */
904
1033
  type InitializedType<
905
1034
  Fields extends DataSchema,
906
1035
  Opts extends Options<Fields> = DefaultOptions,
907
- > = DataField.DerivedInitializedType<InnerInitializedType<Fields>, MergedOptions<Fields, Opts>>;
1036
+ > = Internal.InitializedType<Fields, Opts>;
908
1037
 
909
1038
  /**
910
- * A shorthand for the assignment type of a SchemaField class.
911
- * @typeParam Fields - the DataSchema fields of the SchemaField
912
- * @typeParam Opts - the options that override the default options
1039
+ * This is deprecated because of likely confusion between `SchemaField.PersistedData` and `SchemaField.PersistedType`.
1040
+ * @deprecated {@link SchemaField.Internal.PersistedType | `SchemaField.Internal.PersistedType`}
913
1041
  */
914
- type PersistedType<
915
- Fields extends DataSchema,
916
- Opts extends Options<Fields> = DefaultOptions,
917
- > = DataField.DerivedInitializedType<InnerPersistedType<Fields>, MergedOptions<Fields, Opts>>;
1042
+ type PersistedType<Fields extends DataSchema, Opts extends Options<Fields> = DefaultOptions> = Internal.PersistedType<
1043
+ Fields,
1044
+ Opts
1045
+ >;
1046
+
1047
+ /**
1048
+ * @deprecated {@link SchemaField.CreateData | `SchemaField.CreateData`}
1049
+ */
1050
+ type InnerConstructorType<Fields extends DataSchema> = CreateData<Fields>;
1051
+
1052
+ /**
1053
+ * @deprecated This type is a relic of the early days of data models. It was meant to represent
1054
+ * the types that would be valid for the expression `this.schemaProperty = ...`. Modern users will
1055
+ * recognize that the only sane thing to do here is to use `InitializedData` but when data models
1056
+ * were first being introduced there was an attempt to support a sort of strange compromise between
1057
+ * `InitializedData`, `SourceData`, and even `CreateData` to an extent.
1058
+ *
1059
+ * You should instead use those types as appropriate.
1060
+ */
1061
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
1062
+ type InnerAssignmentType<Fields extends DataSchema> = AssignmentData<Fields>;
1063
+
1064
+ /**
1065
+ * @deprecated {@link SchemaField.InitializedData | `SchemaField.InitializedData`}
1066
+ */
1067
+ type InnerInitializedType<Fields extends DataSchema> = InitializedData<Fields>;
1068
+
1069
+ /**
1070
+ * @deprecated {@link SchemaField.UpdateData | `SchemaField.UpdateData`}
1071
+ */
1072
+ type InnerUpdateData<Fields extends DataSchema> = UpdateData<Fields>;
1073
+
1074
+ /**
1075
+ * @deprecated {@link SchemaField.SourceData | `SchemaField.SourceData`}
1076
+ */
1077
+ type InnerPersistedType<Fields extends DataSchema> = SourceData<Fields>;
918
1078
  }
919
1079
 
920
1080
  /**
921
- * A subclass of [DataField]{@link DataField} which deals with boolean-typed data.
1081
+ * A subclass of {@link DataField | `DataField`} which deals with boolean-typed data.
922
1082
  * @typeParam Options - the options of the BooleanField instance
923
1083
  * @typeParam AssignmentType - the type of the allowed assignment values of the BooleanField
924
1084
  * @typeParam InitializedType - the type of the initialized values of the BooleanField
@@ -932,6 +1092,7 @@ declare namespace SchemaField {
932
1092
  */
933
1093
  declare class BooleanField<
934
1094
  const Options extends BooleanField.Options = BooleanField.DefaultOptions,
1095
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
935
1096
  const AssignmentType = BooleanField.AssignmentType<SimpleMerge<Options, BooleanField.DefaultOptions>>,
936
1097
  const InitializedType = BooleanField.InitializedType<SimpleMerge<Options, BooleanField.DefaultOptions>>,
937
1098
  const PersistedType extends boolean | null | undefined = BooleanField.InitializedType<
@@ -963,7 +1124,7 @@ declare namespace BooleanField {
963
1124
  /** A shorthand for the options of a BooleanField class. */
964
1125
  type Options = DataField.Options<boolean>;
965
1126
 
966
- /** The type of the default options for the {@link BooleanField} class. */
1127
+ /** The type of the default options for the {@link BooleanField | `BooleanField`} class. */
967
1128
  type DefaultOptions = SimpleMerge<
968
1129
  DataField.DefaultOptions,
969
1130
  {
@@ -982,7 +1143,11 @@ declare namespace BooleanField {
982
1143
  /**
983
1144
  * A shorthand for the assignment type of a BooleanField class.
984
1145
  * @typeParam Opts - the options that override the default options
1146
+ *
1147
+ * @deprecated - AssignmentData is being phased out. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
1148
+ * for more details.
985
1149
  */
1150
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
986
1151
  type AssignmentType<Opts extends Options> = DataField.DerivedAssignmentType<boolean, MergedOptions<Opts>>;
987
1152
 
988
1153
  /**
@@ -993,7 +1158,7 @@ declare namespace BooleanField {
993
1158
  }
994
1159
 
995
1160
  /**
996
- * A subclass of [DataField]{@link DataField} which deals with number-typed data.
1161
+ * A subclass of {@link DataField | `DataField`} which deals with number-typed data.
997
1162
  * @typeParam Options - the options of the NumberField instance
998
1163
  * @typeParam AssignmentType - the type of the allowed assignment values of the NumberField
999
1164
  * @typeParam InitializedType - the type of the initialized values of the NumberField
@@ -1007,6 +1172,7 @@ declare namespace BooleanField {
1007
1172
  */
1008
1173
  declare class NumberField<
1009
1174
  const Options extends NumberField.Options = NumberField.DefaultOptions,
1175
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
1010
1176
  const AssignmentType = NumberField.AssignmentType<Options>,
1011
1177
  const InitializedType = NumberField.InitializedType<Options>,
1012
1178
  const PersistedType extends number | null | undefined = NumberField.InitializedType<Options>,
@@ -1111,7 +1277,7 @@ declare class NumberField<
1111
1277
  }
1112
1278
 
1113
1279
  declare namespace NumberField {
1114
- /** The type of the default options for the {@link NumberField} class. */
1280
+ /** The type of the default options for the {@link NumberField | `NumberField`} class. */
1115
1281
  type DefaultOptions = SimpleMerge<
1116
1282
  DataField.DefaultOptions,
1117
1283
  {
@@ -1166,7 +1332,7 @@ declare namespace NumberField {
1166
1332
  choices?: NumberField.Choices | undefined;
1167
1333
  }
1168
1334
 
1169
- /** The type of the default options for the {@link NumberField} class when choices are provided. */
1335
+ /** The type of the default options for the {@link NumberField | `NumberField`} class when choices are provided. */
1170
1336
  type DefaultOptionsWhenChoicesProvided = SimpleMerge<DefaultOptions, { nullable: false }>;
1171
1337
 
1172
1338
  /**
@@ -1181,7 +1347,11 @@ declare namespace NumberField {
1181
1347
  /**
1182
1348
  * A shorthand for the assignment type of a NumberField class.
1183
1349
  * @typeParam Options - the options that override the default options
1350
+ *
1351
+ * @deprecated - AssignmentData is being phased out. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
1352
+ * for more details.
1184
1353
  */
1354
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
1185
1355
  type AssignmentType<Options extends NumberField.Options> = DataField.DerivedAssignmentType<
1186
1356
  number,
1187
1357
  MergedOptions<Options>
@@ -1228,7 +1398,7 @@ declare namespace NumberField {
1228
1398
  }
1229
1399
 
1230
1400
  /**
1231
- * A subclass of [DataField]{@link DataField} which deals with string-typed data.
1401
+ * A subclass of {@link DataField | `DataField`} which deals with string-typed data.
1232
1402
  * @typeParam Options - the options of the StringField instance
1233
1403
  * @typeParam AssignmentType - the type of the allowed assignment values of the StringField
1234
1404
  * @typeParam InitializedType - the type of the initialized values of the StringField
@@ -1241,7 +1411,8 @@ declare namespace NumberField {
1241
1411
  * InitialValue: `""`
1242
1412
  */
1243
1413
  declare class StringField<
1244
- const Options extends StringField.Options = StringField.DefaultOptions,
1414
+ const Options extends StringField.Options<unknown> = StringField.DefaultOptions,
1415
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
1245
1416
  const AssignmentType = StringField.AssignmentType<Options>,
1246
1417
  const InitializedType = StringField.InitializedType<Options>,
1247
1418
  const PersistedType extends string | null | undefined = StringField.InitializedType<Options>,
@@ -1280,7 +1451,7 @@ declare class StringField<
1280
1451
  /** @defaultValue `false` */
1281
1452
  textSearch: boolean;
1282
1453
 
1283
- protected static override get _defaults(): StringField.Options;
1454
+ protected static override get _defaults(): StringField.Options<unknown>;
1284
1455
 
1285
1456
  override clean(value: AssignmentType, options?: DataField.CleanOptions): InitializedType;
1286
1457
 
@@ -1331,7 +1502,7 @@ declare class StringField<
1331
1502
  }
1332
1503
 
1333
1504
  declare namespace StringField {
1334
- /** The type of the default options for the {@link StringField} class. */
1505
+ /** The type of the default options for the {@link StringField | `StringField`} class. */
1335
1506
  type DefaultOptions = SimpleMerge<
1336
1507
  DataField.DefaultOptions,
1337
1508
  {
@@ -1343,7 +1514,7 @@ declare namespace StringField {
1343
1514
  }
1344
1515
  >;
1345
1516
 
1346
- interface Options extends DataField.Options<string> {
1517
+ interface Options<Type = string> extends DataField.Options<Type> {
1347
1518
  /**
1348
1519
  * Is the string allowed to be blank (empty)?
1349
1520
  * @defaultValue `true`
@@ -1370,14 +1541,14 @@ declare namespace StringField {
1370
1541
  textSearch?: boolean | undefined;
1371
1542
  }
1372
1543
 
1373
- /** The type of the default options for the {@link StringField} class when choices are provided. */
1544
+ /** The type of the default options for the {@link StringField | `StringField`} class when choices are provided. */
1374
1545
  type DefaultOptionsWhenChoicesProvided = SimpleMerge<DefaultOptions, { nullable: false; blank: false }>;
1375
1546
 
1376
1547
  /**
1377
1548
  * A helper type for the given options type merged into the default options of the StringField class.
1378
1549
  * @typeParam Options - the options that override the default options
1379
1550
  */
1380
- type MergedOptions<Options extends StringField.Options> = SimpleMerge<
1551
+ type MergedOptions<Options extends StringField.Options<unknown>> = SimpleMerge<
1381
1552
  _OptionsForInitial<_OptionsForChoices<Options["choices"]>>,
1382
1553
  Options
1383
1554
  >;
@@ -1387,11 +1558,11 @@ declare namespace StringField {
1387
1558
  : DefaultOptionsWhenChoicesProvided;
1388
1559
 
1389
1560
  // FIXME: `"initial" extends keyof Options` does not work for modeling `"initial" in options`.
1390
- type _OptionsForInitial<Options extends StringField.Options> = "initial" extends keyof Options
1561
+ type _OptionsForInitial<Options extends StringField.Options<unknown>> = "initial" extends keyof Options
1391
1562
  ? Options
1392
1563
  : SimpleMerge<Options, { initial: _InitialForOptions<Options> }>;
1393
1564
 
1394
- type _InitialForOptions<Options extends StringField.Options> = Options["required"] extends false | undefined
1565
+ type _InitialForOptions<Options extends StringField.Options<unknown>> = Options["required"] extends false | undefined
1395
1566
  ? undefined
1396
1567
  : Options["blank"] extends true
1397
1568
  ? string
@@ -1401,7 +1572,7 @@ declare namespace StringField {
1401
1572
 
1402
1573
  // choices?: string[] | Record<string, string> | (() => string[] | Record<string, string>) | undefined;
1403
1574
 
1404
- type ValidChoice<Options extends StringField.Options> = Options["choices"] extends undefined
1575
+ type ValidChoice<Options extends StringField.Options<unknown>> = Options["choices"] extends undefined
1405
1576
  ? string
1406
1577
  : Options["choices"] extends (...args: infer _1) => infer Choices
1407
1578
  ? FixedChoice<Choices>
@@ -1417,8 +1588,12 @@ declare namespace StringField {
1417
1588
  /**
1418
1589
  * A shorthand for the assignment type of a StringField class.
1419
1590
  * @typeParam Options - the options that override the default options
1591
+ *
1592
+ * @deprecated - AssignmentData is being phased out. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
1593
+ * for more details.
1420
1594
  */
1421
- type AssignmentType<Options extends StringField.Options> = DataField.DerivedAssignmentType<
1595
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
1596
+ type AssignmentType<Options extends StringField.Options<unknown>> = DataField.DerivedAssignmentType<
1422
1597
  ValidChoice<Options>,
1423
1598
  MergedOptions<Options>
1424
1599
  >;
@@ -1427,7 +1602,7 @@ declare namespace StringField {
1427
1602
  * A shorthand for the initialized type of a StringField class.
1428
1603
  * @typeParam Options - the options that override the default options
1429
1604
  */
1430
- type InitializedType<Options extends StringField.Options> = DataField.DerivedInitializedType<
1605
+ type InitializedType<Options extends StringField.Options<unknown>> = DataField.DerivedInitializedType<
1431
1606
  // TODO(LukeAbby): This is a workaround for how `ValidChoice` is defined ignorant of the `StringField`/`NumberField` divide.
1432
1607
  ValidChoice<Options> & (string | null | undefined),
1433
1608
  MergedOptions<Options>
@@ -1469,7 +1644,7 @@ declare namespace StringField {
1469
1644
  }
1470
1645
 
1471
1646
  /**
1472
- * A subclass of [DataField]{@link DataField} which deals with object-typed data.
1647
+ * A subclass of {@link DataField | `DataField`} which deals with object-typed data.
1473
1648
  * @typeParam Options - the options of the ObjectField instance
1474
1649
  * @typeParam AssignmentType - the type of the allowed assignment values of the ObjectField
1475
1650
  * @typeParam InitializedType - the type of the initialized values of the ObjectField
@@ -1483,6 +1658,7 @@ declare namespace StringField {
1483
1658
  */
1484
1659
  declare class ObjectField<
1485
1660
  const Options extends DataField.Options<AnyObject> = ObjectField.DefaultOptions,
1661
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
1486
1662
  const AssignmentType = ObjectField.AssignmentType<Options>,
1487
1663
  const InitializedType = ObjectField.InitializedType<Options>,
1488
1664
  const PersistedType extends AnyObject | null | undefined = ObjectField.InitializedType<Options>,
@@ -1515,7 +1691,7 @@ declare class ObjectField<
1515
1691
  }
1516
1692
 
1517
1693
  declare namespace ObjectField {
1518
- /** The type of the default options for the {@link ObjectField} class. */
1694
+ /** The type of the default options for the {@link ObjectField | `ObjectField`} class. */
1519
1695
  type DefaultOptions = SimpleMerge<
1520
1696
  DataField.DefaultOptions,
1521
1697
  {
@@ -1533,7 +1709,11 @@ declare namespace ObjectField {
1533
1709
  /**
1534
1710
  * A shorthand for the assignment type of a ObjectField class.
1535
1711
  * @typeParam Options - the options that override the default options
1712
+ *
1713
+ * @deprecated - AssignmentData is being phased out. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
1714
+ * for more details.
1536
1715
  */
1716
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
1537
1717
  type AssignmentType<Options extends DataField.Options<AnyObject>> = DataField.DerivedAssignmentType<
1538
1718
  AnyObject,
1539
1719
  MergedOptions<Options>
@@ -1549,7 +1729,7 @@ declare namespace ObjectField {
1549
1729
  >;
1550
1730
 
1551
1731
  /**
1552
- * A helper to create a flags object field for the given key in the {@link FlagConfig}.
1732
+ * A helper to create a flags object field for the given key in the {@link FlagConfig | `FlagConfig`}.
1553
1733
  * @typeParam Key - the key to look for in the FlagConfig
1554
1734
  * @typeParam ExtensionFlags - additional flags besides the ones configured for the class
1555
1735
  * @typeParam Options - the options of the field
@@ -1562,14 +1742,24 @@ declare namespace ObjectField {
1562
1742
  Options extends DataField.Options.Any = ObjectField.DefaultOptions,
1563
1743
  > = ObjectField<
1564
1744
  Options,
1565
- DataField.DerivedAssignmentType<Document.ConfiguredFlagsForName<Name> & ExtensionFlags, MergedOptions<Options>>,
1566
- DataField.DerivedInitializedType<Document.ConfiguredFlagsForName<Name> & ExtensionFlags, MergedOptions<Options>>,
1567
- DataField.DerivedInitializedType<Document.ConfiguredFlagsForName<Name> & ExtensionFlags, MergedOptions<Options>>
1745
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
1746
+ DataField.DerivedAssignmentType<
1747
+ Document.ConfiguredFlagsForName<Name> & ExtensionFlags & InterfaceToObject<Document.CoreFlags>,
1748
+ MergedOptions<Options>
1749
+ >,
1750
+ DataField.DerivedInitializedType<
1751
+ Document.ConfiguredFlagsForName<Name> & ExtensionFlags & InterfaceToObject<Document.CoreFlags>,
1752
+ MergedOptions<Options>
1753
+ >,
1754
+ DataField.DerivedInitializedType<
1755
+ Document.ConfiguredFlagsForName<Name> & ExtensionFlags & InterfaceToObject<Document.CoreFlags>,
1756
+ MergedOptions<Options>
1757
+ >
1568
1758
  >;
1569
1759
  }
1570
1760
 
1571
1761
  /**
1572
- * A subclass of [DataField]{@link DataField} which deals with array-typed data.
1762
+ * A subclass of {@link DataField | `DataField`} which deals with array-typed data.
1573
1763
  * @typeParam ElementFieldType - the field type for the elements in the ArrayField
1574
1764
  * @typeParam AssignmentElementType - the assignment type for the elements in the array
1575
1765
  * @typeParam InitializedElementType - the initialized type for the elements in the array
@@ -1588,10 +1778,13 @@ declare namespace ObjectField {
1588
1778
  declare class ArrayField<
1589
1779
  const ElementFieldType extends DataField.Any | Document.AnyConstructor,
1590
1780
  const Options extends ArrayField.AnyOptions = ArrayField.DefaultOptions<
1781
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
1591
1782
  ArrayField.AssignmentElementType<ElementFieldType>
1592
1783
  >,
1784
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
1593
1785
  const AssignmentElementType = ArrayField.AssignmentElementType<ElementFieldType>,
1594
1786
  const InitializedElementType = ArrayField.InitializedElementType<ElementFieldType>,
1787
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
1595
1788
  const AssignmentType = ArrayField.AssignmentType<AssignmentElementType, Options>,
1596
1789
  const InitializedType = ArrayField.InitializedType<AssignmentElementType, InitializedElementType, Options>,
1597
1790
  const PersistedElementType = ArrayField.PersistedElementType<ElementFieldType>,
@@ -1622,6 +1815,7 @@ declare class ArrayField<
1622
1815
  element: ElementFieldType;
1623
1816
 
1624
1817
  protected static override get _defaults(): ArrayField.Options<
1818
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
1625
1819
  ArrayField.AssignmentElementType<DataField.Any | Document.AnyConstructor>
1626
1820
  >;
1627
1821
 
@@ -1654,7 +1848,7 @@ declare class ArrayField<
1654
1848
  * @returns An array of element-specific errors
1655
1849
  */
1656
1850
  protected _validateElements(
1657
- value: any[],
1851
+ value: AnyArray,
1658
1852
  options?: DataField.ValidationOptions<DataField.Any>,
1659
1853
  ): DataModelValidationFailure | void;
1660
1854
 
@@ -1665,7 +1859,7 @@ declare class ArrayField<
1665
1859
  * @returns A validation failure if the element failed validation
1666
1860
  */
1667
1861
  protected _validateElement(
1668
- value: any,
1862
+ value: unknown,
1669
1863
  options: DataField.ValidationOptions<DataField.Any>,
1670
1864
  ): DataModelValidationFailure | void;
1671
1865
 
@@ -1704,7 +1898,7 @@ declare namespace ArrayField {
1704
1898
  type AnyOptions = Options<unknown>;
1705
1899
 
1706
1900
  /**
1707
- * The base assignment type for the {@link ArrayField} class.
1901
+ * The base assignment type for the {@link ArrayField | `ArrayField`} class.
1708
1902
  * @typeParam AssignmentElementType - the assignment type of the elements in the array
1709
1903
  */
1710
1904
  type BaseAssignmentType<AssignmentElementType> =
@@ -1714,7 +1908,7 @@ declare namespace ArrayField {
1714
1908
  | AssignmentElementType;
1715
1909
 
1716
1910
  /**
1717
- * The type of the default options for the {@link ArrayField} class.
1911
+ * The type of the default options for the {@link ArrayField | `ArrayField`} class.
1718
1912
  * @typeParam AssignmentElementType - the assignment type of the elements in the array
1719
1913
  */
1720
1914
  type DefaultOptions<AssignmentElementType> = SimpleMerge<
@@ -1739,41 +1933,48 @@ declare namespace ArrayField {
1739
1933
  /**
1740
1934
  * A type to infer the assignment element type of an ArrayField from its ElementFieldType.
1741
1935
  * @typeParam ElementFieldType - the DataField type of the elements in the ArrayField
1936
+ *
1937
+ * @deprecated - AssignmentData is being phased out. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
1938
+ * for more details.
1742
1939
  */
1743
1940
  type AssignmentElementType<ElementFieldType extends DataField.Any | Document.AnyConstructor> =
1744
- ElementFieldType extends DataField<any, infer Assign, any, any>
1745
- ? Assign
1746
- : ElementFieldType extends new (...args: any[]) => Document<any, infer Schema extends DataSchema, any>
1747
- ? SchemaField.InnerAssignmentType<Schema>
1748
- : never;
1941
+ ElementFieldType extends
1942
+ | (abstract new (...args: infer _1) => { " __fvtt_types_internal_assignment_data": infer AssignmentData })
1943
+ | { " __fvtt_types_internal_assignment_data": infer AssignmentData }
1944
+ ? AssignmentData
1945
+ : never;
1749
1946
 
1750
1947
  /**
1751
1948
  * A type to infer the initialized element type of an ArrayField from its ElementFieldType.
1752
1949
  * @typeParam ElementFieldType - the DataField type of the elements in the ArrayField
1753
1950
  */
1754
1951
  type InitializedElementType<ElementFieldType extends DataField.Any | Document.AnyConstructor> =
1755
- ElementFieldType extends DataField<any, any, infer Init, any>
1756
- ? Init
1757
- : ElementFieldType extends new (...args: any[]) => Document<any, infer Schema extends DataSchema, any>
1758
- ? SchemaField.InnerInitializedType<Schema>
1759
- : never;
1952
+ ElementFieldType extends
1953
+ | (abstract new (...args: infer _1) => { " __fvtt_types_internal_initialized_data": infer InitializedData })
1954
+ | { " __fvtt_types_internal_initialized_data": infer InitializedData }
1955
+ ? InitializedData
1956
+ : never;
1760
1957
 
1761
1958
  /**
1762
1959
  * A type to infer the initialized element type of an ArrayField from its ElementFieldType.
1763
1960
  * @typeParam ElementFieldType - the DataField type of the elements in the ArrayField
1764
1961
  */
1765
1962
  type PersistedElementType<ElementFieldType extends DataField.Any | Document.AnyConstructor> =
1766
- ElementFieldType extends DataField<any, any, any, infer Persist>
1767
- ? Persist
1768
- : ElementFieldType extends new (...args: any[]) => Document<any, infer Schema extends DataSchema, any>
1769
- ? SchemaField.InnerPersistedType<Schema>
1770
- : never;
1963
+ ElementFieldType extends
1964
+ | (abstract new (...args: infer _1) => { " __fvtt_types_internal_source_data": infer PersistedData })
1965
+ | { " __fvtt_types_internal_source_data": infer PersistedData }
1966
+ ? PersistedData
1967
+ : never;
1771
1968
 
1772
1969
  /**
1773
1970
  * A shorthand for the assignment type of an ArrayField class.
1774
1971
  * @typeParam AssignmentElementType - the assignment type of the elements of the ArrayField
1775
1972
  * @typeParam Opts - the options that override the default options
1973
+ *
1974
+ * @deprecated - AssignmentData is being phased out. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
1975
+ * for more details.
1776
1976
  */
1977
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
1777
1978
  type AssignmentType<AssignmentElementType, Opts extends AnyOptions> = DataField.DerivedAssignmentType<
1778
1979
  BaseAssignmentType<AssignmentElementType>,
1779
1980
  MergedOptions<AssignmentElementType, Opts>
@@ -1794,7 +1995,7 @@ declare namespace ArrayField {
1794
1995
  /**
1795
1996
  * A shorthand for the persisted type of an ArrayField class.
1796
1997
  * @typeParam AssignmentElementType - the assignment type of the elements of the ArrayField
1797
- * @typeParam PersistedElementType - the perssited type of the elements of the ArrayField
1998
+ * @typeParam PersistedElementType - the persisted type of the elements of the ArrayField
1798
1999
  * @typeParam Opts - the options that override the default options
1799
2000
  */
1800
2001
  type PersistedType<
@@ -1805,7 +2006,7 @@ declare namespace ArrayField {
1805
2006
  }
1806
2007
 
1807
2008
  /**
1808
- * A subclass of [ArrayField]{@link ArrayField} which supports a set of contained elements.
2009
+ * A subclass of {@link ArrayField | `ArrayField`} which supports a set of contained elements.
1809
2010
  * Elements in this set are treated as fungible and may be represented in any order or discarded if invalid.
1810
2011
  * @typeParam ElementFieldType - the field type for the elements in the SetField
1811
2012
  * @typeParam AssignmentElementType - the assignment type for the elements in the set
@@ -1824,9 +2025,12 @@ declare namespace ArrayField {
1824
2025
  */
1825
2026
  declare class SetField<
1826
2027
  ElementFieldType extends DataField.Any,
2028
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
1827
2029
  Options extends SetField.AnyOptions = SetField.DefaultOptions<ArrayField.AssignmentElementType<ElementFieldType>>,
2030
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
1828
2031
  AssignmentElementType = ArrayField.AssignmentElementType<ElementFieldType>,
1829
2032
  InitializedElementType = ArrayField.InitializedElementType<ElementFieldType>,
2033
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
1830
2034
  AssignmentType = SetField.AssignmentType<AssignmentElementType, Options>,
1831
2035
  InitializedType = SetField.InitializedType<AssignmentElementType, InitializedElementType, Options>,
1832
2036
  PersistedElementType = ArrayField.PersistedElementType<ElementFieldType>,
@@ -1872,24 +2076,27 @@ declare class SetField<
1872
2076
 
1873
2077
  declare namespace SetField {
1874
2078
  /** Any SetField */
1875
- type Any = SetField<DataField.Any, any, any, any, any, any, any, any>;
2079
+ interface Any extends SetField<DataField.Any, any, any, any, any, any, any, any> {}
1876
2080
 
1877
2081
  /**
1878
2082
  * A shorthand for the options of a SetField class.
1879
2083
  * @typeParam AssignmentElementType - the assignment type of the elements in the array
1880
2084
  */
2085
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
1881
2086
  type Options<AssignmentElementType> = DataField.Options<SetField.BaseAssignmentType<AssignmentElementType>>;
1882
2087
 
1883
2088
  type AnyOptions = Options<unknown>;
1884
2089
 
1885
2090
  /**
1886
- * The base assignment type for the {@link SetField} class.
2091
+ * The base assignment type for the {@link SetField | `SetField`} class.
1887
2092
  * @typeParam AssignmentElementType - the assignment type of the elements in the array
2093
+ *
2094
+ * @deprecated - Assignment type is being deprecated.
1888
2095
  */
1889
2096
  type BaseAssignmentType<AssignmentElementType> = ArrayField.BaseAssignmentType<AssignmentElementType>;
1890
2097
 
1891
2098
  /**
1892
- * The type of the default options for the {@link SetField} class.
2099
+ * The type of the default options for the {@link SetField | `SetField`} class.
1893
2100
  * @typeParam AssignmentElementType - the assignment type of the elements in the array
1894
2101
  */
1895
2102
  type DefaultOptions<AssignmentElementType> = ArrayField.DefaultOptions<AssignmentElementType>;
@@ -1908,8 +2115,13 @@ declare namespace SetField {
1908
2115
  * A shorthand for the assignment type of a SetField class.
1909
2116
  * @typeParam AssignmentElementType - the assignment type of the elements of the SetField
1910
2117
  * @typeParam Opts - the options that override the default options
2118
+ *
2119
+ * @deprecated - AssignmentData is being phased out. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
2120
+ * for more details.
1911
2121
  */
2122
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
1912
2123
  type AssignmentType<AssignmentElementType, Opts extends AnyOptions> = DataField.DerivedAssignmentType<
2124
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
1913
2125
  BaseAssignmentType<AssignmentElementType>,
1914
2126
  MergedOptions<AssignmentElementType, Opts>
1915
2127
  >;
@@ -1929,7 +2141,7 @@ declare namespace SetField {
1929
2141
  /**
1930
2142
  * A shorthand for the persisted type of a SetField class.
1931
2143
  * @typeParam AssignmentElementType - the assignment type of the elements of the SetField
1932
- * @typeParam PersistedElementType - the perssited type of the elements of the SetField
2144
+ * @typeParam PersistedElementType - the persisted type of the elements of the SetField
1933
2145
  * @typeParam Opts - the options that override the default options
1934
2146
  */
1935
2147
  type PersistedType<
@@ -1948,7 +2160,7 @@ declare namespace SetField {
1948
2160
  }
1949
2161
 
1950
2162
  /**
1951
- * A subclass of [ObjectField]{@link ObjectField} which embeds some other DataModel definition as an inner object.
2163
+ * A subclass of {@link ObjectField | `ObjectField`} which embeds some other DataModel definition as an inner object.
1952
2164
  * @typeParam ModelType - the DataModel for the embedded data
1953
2165
  * @typeParam Options - the options of the EmbeddedDataField instance
1954
2166
  * @typeParam AssignmentType - the type of the allowed assignment values of the EmbeddedDataField
@@ -1964,6 +2176,7 @@ declare namespace SetField {
1964
2176
  declare class EmbeddedDataField<
1965
2177
  const ModelType extends DataModel.AnyConstructor,
1966
2178
  const Options extends EmbeddedDataField.Options<ModelType> = EmbeddedDataField.DefaultOptions,
2179
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
1967
2180
  const AssignmentType = EmbeddedDataField.AssignmentType<ModelType, Options>,
1968
2181
  const InitializedType = EmbeddedDataField.InitializedType<ModelType, Options>,
1969
2182
  const PersistedType extends AnyObject | null | undefined = EmbeddedDataField.PersistedType<ModelType, Options>,
@@ -2005,10 +2218,11 @@ declare namespace EmbeddedDataField {
2005
2218
  * @typeParam ModelType - the DataModel for the embedded data
2006
2219
  */
2007
2220
  type Options<ModelType extends DataModel.AnyConstructor> = DataField.Options<
2008
- SchemaField.InnerAssignmentType<DataModel.SchemaOfClass<ModelType>> | __SchemaFieldInitial
2221
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2222
+ SchemaField.AssignmentData<DataModel.SchemaOfClass<ModelType>> | __SchemaFieldInitial
2009
2223
  >;
2010
2224
 
2011
- /** The type of the default options for the {@link EmbeddedDataField} class. */
2225
+ /** The type of the default options for the {@link EmbeddedDataField | `EmbeddedDataField`} class. */
2012
2226
  type DefaultOptions = SchemaField.DefaultOptions;
2013
2227
 
2014
2228
  /**
@@ -2025,12 +2239,17 @@ declare namespace EmbeddedDataField {
2025
2239
  * A shorthand for the assignment type of an EmbeddedDataField class.
2026
2240
  * @typeParam ModelType - the DataModel for the embedded data
2027
2241
  * @typeParam Opts - the options that override the default options
2242
+ *
2243
+ * @deprecated - AssignmentType is being deprecated. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
2244
+ * for more details.
2028
2245
  */
2029
2246
  type AssignmentType<
2030
2247
  ModelType extends DataModel.AnyConstructor,
2031
2248
  Opts extends Options<ModelType>,
2249
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2032
2250
  > = DataField.DerivedAssignmentType<
2033
- SchemaField.InnerAssignmentType<DataModel.SchemaOfClass<ModelType>>,
2251
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2252
+ SchemaField.AssignmentData<DataModel.SchemaOfClass<ModelType>>,
2034
2253
  MergedOptions<ModelType, Opts>
2035
2254
  >;
2036
2255
 
@@ -2054,13 +2273,13 @@ declare namespace EmbeddedDataField {
2054
2273
  ModelType extends DataModel.AnyConstructor,
2055
2274
  Opts extends Options<ModelType>,
2056
2275
  > = DataField.DerivedInitializedType<
2057
- SchemaField.InnerPersistedType<DataModel.SchemaOfClass<ModelType>>,
2276
+ SchemaField.SourceData<DataModel.SchemaOfClass<ModelType>>,
2058
2277
  MergedOptions<ModelType, Opts>
2059
2278
  >;
2060
2279
  }
2061
2280
 
2062
2281
  /**
2063
- * A subclass of [ArrayField]{@link ArrayField} which supports an embedded Document collection.
2282
+ * A subclass of {@link ArrayField | `ArrayField`} which supports an embedded Document collection.
2064
2283
  * Invalid elements will be dropped from the collection during validation rather than failing for the field entirely.
2065
2284
  * @typeParam ElementFieldType - the field type for the elements in the EmbeddedCollectionField
2066
2285
  * @typeParam AssignmentElementType - the assignment type for the elements in the collection
@@ -2082,10 +2301,13 @@ declare class EmbeddedCollectionField<
2082
2301
  // TODO(LukeAbby): See if `ParentDataModel` can be made redundant by automatically inferring.
2083
2302
  ParentDataModel extends Document.Any,
2084
2303
  Options extends EmbeddedCollectionField.Options<any> = EmbeddedCollectionField.DefaultOptions<
2304
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2085
2305
  EmbeddedCollectionField.AssignmentElementType<ElementFieldType>
2086
2306
  >,
2307
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2087
2308
  AssignmentElementType = EmbeddedCollectionField.AssignmentElementType<ElementFieldType>,
2088
2309
  InitializedElementType extends Document.Any = EmbeddedCollectionField.InitializedElementType<ElementFieldType>,
2310
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2089
2311
  AssignmentType = EmbeddedCollectionField.AssignmentType<AssignmentElementType, Options>,
2090
2312
  InitializedType = EmbeddedCollectionField.InitializedType<
2091
2313
  AssignmentElementType,
@@ -2174,7 +2396,7 @@ declare class EmbeddedCollectionField<
2174
2396
  }
2175
2397
 
2176
2398
  declare namespace EmbeddedCollectionField {
2177
- type Any = EmbeddedCollectionField<any, any, any, any, any, any, any, any, any>;
2399
+ interface Any extends EmbeddedCollectionField<any, any, any, any, any, any, any, any, any> {}
2178
2400
 
2179
2401
  /**
2180
2402
  * A shorthand for the options of an EmbeddedCollectionField class.
@@ -2183,7 +2405,7 @@ declare namespace EmbeddedCollectionField {
2183
2405
  type Options<AssignmentElementType> = DataField.Options<ArrayField.BaseAssignmentType<AssignmentElementType>>;
2184
2406
 
2185
2407
  /**
2186
- * The type of the default options for the {@link EmbeddedCollectionField} class.
2408
+ * The type of the default options for the {@link EmbeddedCollectionField | `EmbeddedCollectionField`} class.
2187
2409
  * @typeParam AssignmentElementType - the assignment type of the elements of the EmbeddedCollectionField
2188
2410
  */
2189
2411
  type DefaultOptions<AssignmentElementType> = ArrayField.DefaultOptions<AssignmentElementType>;
@@ -2201,11 +2423,15 @@ declare namespace EmbeddedCollectionField {
2201
2423
  /**
2202
2424
  * A type to infer the assignment element type of an EmbeddedCollectionField from its ElementFieldType.
2203
2425
  * @typeParam ElementFieldType - the DataField type of the elements in the EmbeddedCollectionField
2204
- */
2205
- type AssignmentElementType<ElementFieldType extends Document.AnyConstructor> = ElementFieldType extends new (
2206
- ...args: any[]
2207
- ) => Document<any, infer Schema extends DataSchema, any>
2208
- ? SchemaField.InnerAssignmentType<Schema>
2426
+ *
2427
+ * @deprecated - AssignmentType is being deprecated. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
2428
+ * for more details.
2429
+ */
2430
+ // Note(LukeAbby): For some reason checking `extends Document` causes issues where this doesn't.
2431
+ type AssignmentElementType<ElementFieldType extends Document.AnyConstructor> = ElementFieldType extends abstract new (
2432
+ ...args: infer _1
2433
+ ) => { " __fvtt_types_internal_assignment_data": infer AssignmentData }
2434
+ ? AssignmentData
2209
2435
  : never;
2210
2436
 
2211
2437
  /**
@@ -2219,20 +2445,25 @@ declare namespace EmbeddedCollectionField {
2219
2445
  * A type to infer the initialized element type of an EmbeddedCollectionField from its ElementFieldType.
2220
2446
  * @typeParam ElementFieldType - the DataField type of the elements in the EmbeddedCollectionField
2221
2447
  */
2222
- type PersistedElementType<ElementFieldType extends Document.AnyConstructor> = ElementFieldType extends new (
2223
- ...args: any[]
2224
- ) => Document<any, infer Schema extends DataSchema, any>
2225
- ? SchemaField.InnerPersistedType<Schema>
2448
+ // Note(LukeAbby): For some reason checking `extends Document` causes issues where this doesn't.
2449
+ type PersistedElementType<ElementFieldType extends Document.AnyConstructor> = ElementFieldType extends abstract new (
2450
+ ...args: infer _1
2451
+ ) => { " __fvtt_types_internal_source_data": infer AssignmentData }
2452
+ ? AssignmentData
2226
2453
  : never;
2227
2454
 
2228
2455
  /**
2229
2456
  * A shorthand for the assignment type of an ArrayField class.
2230
2457
  * @typeParam AssignmentElementType - the assignment type of the elements of the EmbeddedCollectionField
2231
2458
  * @typeParam Opts - the options that override the default options
2459
+ *
2460
+ * @deprecated - AssignmentType is being deprecated. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
2461
+ * for more details.
2232
2462
  */
2233
2463
  type AssignmentType<
2234
2464
  AssignmentElementType,
2235
2465
  Opts extends Options<AssignmentElementType>,
2466
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2236
2467
  > = DataField.DerivedAssignmentType<
2237
2468
  ArrayField.BaseAssignmentType<AssignmentElementType>,
2238
2469
  MergedOptions<AssignmentElementType, Opts>
@@ -2257,7 +2488,7 @@ declare namespace EmbeddedCollectionField {
2257
2488
  /**
2258
2489
  * A shorthand for the persisted type of an ArrayField class.
2259
2490
  * @typeParam AssignmentElementType - the assignment type of the elements of the EmbeddedCollectionField
2260
- * @typeParam PersistedElementType - the perssited type of the elements of the EmbeddedCollectionField
2491
+ * @typeParam PersistedElementType - the persisted type of the elements of the EmbeddedCollectionField
2261
2492
  * @typeParam Opts - the options that override the default options
2262
2493
  */
2263
2494
  type PersistedType<
@@ -2268,7 +2499,7 @@ declare namespace EmbeddedCollectionField {
2268
2499
  }
2269
2500
 
2270
2501
  /**
2271
- * A subclass of {@link EmbeddedCollectionField} which manages a collection of delta objects relative to another
2502
+ * A subclass of {@link EmbeddedCollectionField | `EmbeddedCollectionField`} which manages a collection of delta objects relative to another
2272
2503
  * collection.
2273
2504
  * @typeParam ElementFieldType - the field type for the elements in the EmbeddedCollectionDeltaField
2274
2505
  * @typeParam AssignmentElementType - the assignment type for the elements in the collection
@@ -2289,10 +2520,13 @@ declare class EmbeddedCollectionDeltaField<
2289
2520
  ElementFieldType extends Document.AnyConstructor,
2290
2521
  ParentDataModel extends Document.Any,
2291
2522
  Options extends EmbeddedCollectionDeltaField.Options<any> = EmbeddedCollectionDeltaField.DefaultOptions<
2523
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2292
2524
  EmbeddedCollectionDeltaField.AssignmentElementType<ElementFieldType>
2293
2525
  >,
2526
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2294
2527
  AssignmentElementType = EmbeddedCollectionDeltaField.AssignmentElementType<ElementFieldType>,
2295
2528
  InitializedElementType extends Document.Any = EmbeddedCollectionDeltaField.InitializedElementType<ElementFieldType>,
2529
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2296
2530
  AssignmentType = EmbeddedCollectionDeltaField.AssignmentType<AssignmentElementType, Options>,
2297
2531
  InitializedType = EmbeddedCollectionDeltaField.InitializedType<
2298
2532
  AssignmentElementType,
@@ -2335,7 +2569,7 @@ declare namespace EmbeddedCollectionDeltaField {
2335
2569
  type Options<AssignmentElementType> = DataField.Options<ArrayField.BaseAssignmentType<AssignmentElementType>>;
2336
2570
 
2337
2571
  /**
2338
- * The type of the default options for the {@link EmbeddedCollectionDeltaField} class.
2572
+ * The type of the default options for the {@link EmbeddedCollectionDeltaField | `EmbeddedCollectionDeltaField`} class.
2339
2573
  * @typeParam AssignmentElementType - the assignment type of the elements of the EmbeddedCollectionDeltaField
2340
2574
  */
2341
2575
  type DefaultOptions<AssignmentElementType> = ArrayField.DefaultOptions<AssignmentElementType>;
@@ -2353,11 +2587,14 @@ declare namespace EmbeddedCollectionDeltaField {
2353
2587
  /**
2354
2588
  * A type to infer the assignment element type of an EmbeddedCollectionDeltaField from its ElementFieldType.
2355
2589
  * @typeParam ElementFieldType - the DataField type of the elements in the EmbeddedCollectionDeltaField
2590
+ *
2591
+ * @deprecated - AssignmentType is being deprecated. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
2592
+ * for more details.
2356
2593
  */
2357
- type AssignmentElementType<ElementFieldType extends Document.AnyConstructor> = ElementFieldType extends new (
2358
- ...args: any[]
2359
- ) => Document<any, infer Schema extends DataSchema, any>
2360
- ? SchemaField.InnerAssignmentType<Schema>
2594
+ type AssignmentElementType<ElementFieldType extends Document.AnyConstructor> = ElementFieldType extends abstract new (
2595
+ ...args: infer _1
2596
+ ) => { " __fvtt_types_internal_assignment_data": infer AssignmentData }
2597
+ ? AssignmentData
2361
2598
  : never;
2362
2599
 
2363
2600
  /**
@@ -2371,20 +2608,25 @@ declare namespace EmbeddedCollectionDeltaField {
2371
2608
  * A type to infer the initialized element type of an EmbeddedCollectionDeltaField from its ElementFieldType.
2372
2609
  * @typeParam ElementFieldType - the DataField type of the elements in the EmbeddedCollectionDeltaField
2373
2610
  */
2374
- type PersistedElementType<ElementFieldType extends Document.AnyConstructor> = ElementFieldType extends new (
2375
- ...args: any[]
2376
- ) => Document<any, infer Schema extends DataSchema, any>
2377
- ? SchemaField.InnerPersistedType<Schema>
2611
+ // Note(LukeAbby): For some reason checking `extends Document` causes issues where `extends DataModel` doesn't.
2612
+ type PersistedElementType<ElementFieldType extends Document.AnyConstructor> = ElementFieldType extends abstract new (
2613
+ ...args: infer _1
2614
+ ) => { " __fvtt_types_internal_source_data": infer AssignmentData }
2615
+ ? AssignmentData
2378
2616
  : never;
2379
2617
 
2380
2618
  /**
2381
2619
  * A shorthand for the assignment type of an ArrayField class.
2382
2620
  * @typeParam AssignmentElementType - the assignment type of the elements of the EmbeddedCollectionDeltaField
2383
2621
  * @typeParam Opts - the options that override the default options
2622
+ *
2623
+ * @deprecated - AssignmentType is being deprecated. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
2624
+ * for more details.
2384
2625
  */
2385
2626
  type AssignmentType<
2386
2627
  AssignmentElementType,
2387
2628
  Opts extends Options<AssignmentElementType>,
2629
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2388
2630
  > = DataField.DerivedAssignmentType<
2389
2631
  ArrayField.BaseAssignmentType<AssignmentElementType>,
2390
2632
  MergedOptions<AssignmentElementType, Opts>
@@ -2409,7 +2651,7 @@ declare namespace EmbeddedCollectionDeltaField {
2409
2651
  /**
2410
2652
  * A shorthand for the persisted type of an ArrayField class.
2411
2653
  * @typeParam AssignmentElementType - the assignment type of the elements of the EmbeddedCollectionDeltaField
2412
- * @typeParam PersistedElementType - the perssited type of the elements of the EmbeddedCollectionDeltaField
2654
+ * @typeParam PersistedElementType - the persisted type of the elements of the EmbeddedCollectionDeltaField
2413
2655
  * @typeParam Opts - the options that override the default options
2414
2656
  */
2415
2657
  type PersistedType<
@@ -2420,7 +2662,7 @@ declare namespace EmbeddedCollectionDeltaField {
2420
2662
  }
2421
2663
 
2422
2664
  /**
2423
- * A subclass of {@link EmbeddedDataField} which supports a single embedded Document.
2665
+ * A subclass of {@link EmbeddedDataField | `EmbeddedDataField`} which supports a single embedded Document.
2424
2666
  * @typeParam DocumentType - the type of the embedded Document
2425
2667
  * @typeParam Options - the options of the EmbeddedDocumentField instance
2426
2668
  * @typeParam AssignmentType - the type of the allowed assignment values of the EmbeddedDocumentField
@@ -2436,6 +2678,7 @@ declare namespace EmbeddedCollectionDeltaField {
2436
2678
  declare class EmbeddedDocumentField<
2437
2679
  const DocumentType extends Document.AnyConstructor,
2438
2680
  const Options extends EmbeddedDocumentField.Options<DocumentType> = EmbeddedDocumentField.DefaultOptions,
2681
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2439
2682
  const AssignmentType = EmbeddedDocumentField.AssignmentType<DocumentType, Options>,
2440
2683
  const InitializedType = EmbeddedDocumentField.InitializedType<DocumentType, Options>,
2441
2684
  const PersistedType extends AnyObject | null | undefined = EmbeddedDocumentField.PersistedType<DocumentType, Options>,
@@ -2468,15 +2711,18 @@ declare class EmbeddedDocumentField<
2468
2711
  }
2469
2712
 
2470
2713
  declare namespace EmbeddedDocumentField {
2714
+ interface Any extends EmbeddedDocumentField<any, any, any, any, any> {}
2715
+
2471
2716
  /**
2472
2717
  * A shorthand for the options of an EmbeddedDocumentField class.
2473
2718
  * @typeParam DocumentType - the type of the embedded Document
2474
2719
  */
2475
2720
  type Options<DocumentType extends Document.AnyConstructor> = DataField.Options<
2476
- SchemaField.InnerAssignmentType<DataModel.SchemaOfClass<DocumentType>> | __SchemaFieldInitial
2721
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2722
+ SchemaField.AssignmentData<DataModel.SchemaOfClass<DocumentType>> | __SchemaFieldInitial
2477
2723
  >;
2478
2724
 
2479
- /** The type of the default options for the {@link EmbeddedDocumentField} class. */
2725
+ /** The type of the default options for the {@link EmbeddedDocumentField | `EmbeddedDocumentField`} class. */
2480
2726
  type DefaultOptions = SimpleMerge<
2481
2727
  EmbeddedDataField.DefaultOptions,
2482
2728
  {
@@ -2498,12 +2744,17 @@ declare namespace EmbeddedDocumentField {
2498
2744
  * A shorthand for the assignment type of an EmbeddedDocumentField class.
2499
2745
  * @typeParam DocumentType - the type of the embedded Document
2500
2746
  * @typeParam Opts - the options that override the default options
2747
+ *
2748
+ * @deprecated - AssignmentType is being deprecated. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
2749
+ * for more details.
2501
2750
  */
2502
2751
  type AssignmentType<
2503
2752
  DocumentType extends Document.AnyConstructor,
2504
2753
  Opts extends Options<DocumentType>,
2754
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2505
2755
  > = DataField.DerivedAssignmentType<
2506
- SchemaField.InnerAssignmentType<DataModel.SchemaOfClass<DocumentType>>,
2756
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2757
+ SchemaField.AssignmentData<DataModel.SchemaOfClass<DocumentType>>,
2507
2758
  MergedOptions<DocumentType, Opts>
2508
2759
  >;
2509
2760
 
@@ -2516,7 +2767,7 @@ declare namespace EmbeddedDocumentField {
2516
2767
  DocumentType extends Document.AnyConstructor,
2517
2768
  Opts extends Options<DocumentType>,
2518
2769
  > = DataField.DerivedInitializedType<
2519
- SchemaField.InnerInitializedType<DataModel.SchemaOfClass<DocumentType>>,
2770
+ SchemaField.InitializedData<DataModel.SchemaOfClass<DocumentType>>,
2520
2771
  MergedOptions<DocumentType, Opts>
2521
2772
  >;
2522
2773
 
@@ -2529,13 +2780,13 @@ declare namespace EmbeddedDocumentField {
2529
2780
  DocumentType extends Document.AnyConstructor,
2530
2781
  Opts extends Options<DocumentType>,
2531
2782
  > = DataField.DerivedInitializedType<
2532
- SchemaField.InnerPersistedType<DataModel.SchemaOfClass<DocumentType>>,
2783
+ SchemaField.SourceData<DataModel.SchemaOfClass<DocumentType>>,
2533
2784
  MergedOptions<DocumentType, Opts>
2534
2785
  >;
2535
2786
  }
2536
2787
 
2537
2788
  /**
2538
- * A subclass of [StringField]{@link StringField} which provides the primary _id for a Document.
2789
+ * A subclass of {@link StringField | `StringField`} which provides the primary _id for a Document.
2539
2790
  * The field may be initially null, but it must be non-null when it is saved to the database.
2540
2791
  * @typeParam Options - the options of the DocumentIdField instance
2541
2792
  * @typeParam AssignmentType - the type of the allowed assignment values of the DocumentIdField
@@ -2549,7 +2800,8 @@ declare namespace EmbeddedDocumentField {
2549
2800
  * InitialValue: `null`
2550
2801
  */
2551
2802
  declare class DocumentIdField<
2552
- Options extends StringField.Options = DocumentIdField.DefaultOptions,
2803
+ Options extends DocumentIdField.Options = DocumentIdField.DefaultOptions,
2804
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2553
2805
  AssignmentType = DocumentIdField.AssignmentType<Options>,
2554
2806
  InitializedType = DocumentIdField.InitializedType<Options>,
2555
2807
  PersistedType extends string | null | undefined = DocumentIdField.InitializedType<Options>,
@@ -2572,7 +2824,7 @@ declare class DocumentIdField<
2572
2824
  /** @defaultValue `"is not a valid Document ID string"` */
2573
2825
  override validationError: string;
2574
2826
 
2575
- protected static override get _defaults(): StringField.Options;
2827
+ protected static override get _defaults(): StringField.Options<unknown>;
2576
2828
 
2577
2829
  protected override _cast(value: AssignmentType): InitializedType;
2578
2830
 
@@ -2583,7 +2835,11 @@ declare class DocumentIdField<
2583
2835
  }
2584
2836
 
2585
2837
  declare namespace DocumentIdField {
2586
- /** The type of the default options for the {@link DocumentIdField} class. */
2838
+ type Options = StringField.Options<unknown> & {
2839
+ readonly?: boolean;
2840
+ };
2841
+
2842
+ /** The type of the default options for the {@link DocumentIdField | `DocumentIdField`} class. */
2587
2843
  type DefaultOptions = SimpleMerge<
2588
2844
  StringField.DefaultOptions,
2589
2845
  {
@@ -2600,13 +2856,17 @@ declare namespace DocumentIdField {
2600
2856
  * A helper type for the given options type merged into the default options of the DocumentIdField class.
2601
2857
  * @typeParam Options - the options that override the default options
2602
2858
  */
2603
- type MergedOptions<Options extends StringField.Options> = SimpleMerge<DefaultOptions, Options>;
2859
+ type MergedOptions<Options extends StringField.Options<unknown>> = SimpleMerge<DefaultOptions, Options>;
2604
2860
 
2605
2861
  /**
2606
2862
  * A shorthand for the assignment type of a StringField class.
2607
2863
  * @typeParam Options - the options that override the default options
2864
+ *
2865
+ * @deprecated - AssignmentType is being deprecated. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
2866
+ * for more details.
2608
2867
  */
2609
- type AssignmentType<Options extends StringField.Options> = DataField.DerivedAssignmentType<
2868
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2869
+ type AssignmentType<Options extends StringField.Options<unknown>> = DataField.DerivedAssignmentType<
2610
2870
  string | Document.Any,
2611
2871
  MergedOptions<Options>
2612
2872
  >;
@@ -2615,18 +2875,19 @@ declare namespace DocumentIdField {
2615
2875
  * A shorthand for the initialized type of a StringField class.
2616
2876
  * @typeParam Options - the options that override the default options
2617
2877
  */
2618
- type InitializedType<Options extends StringField.Options> = DataField.DerivedInitializedType<
2878
+ type InitializedType<Options extends StringField.Options<unknown>> = DataField.DerivedInitializedType<
2619
2879
  string,
2620
2880
  MergedOptions<Options>
2621
2881
  >;
2622
2882
  }
2623
2883
 
2624
2884
  /**
2625
- * A subclass of {@link StringField} which supports referencing some other Document by its UUID.
2885
+ * A subclass of {@link StringField | `StringField`} which supports referencing some other Document by its UUID.
2626
2886
  * This field may not be blank, but may be null to indicate that no UUID is referenced.
2627
2887
  */
2628
2888
  declare class DocumentUUIDField<
2629
2889
  const Options extends DocumentUUIDField.Options = DocumentUUIDField.DefaultOptions,
2890
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2630
2891
  const AssignmentType = StringField.AssignmentType<Options>,
2631
2892
  const InitializedType = StringField.InitializedType<Options>,
2632
2893
  const PersistedType extends string | null | undefined = StringField.InitializedType<Options>,
@@ -2720,7 +2981,7 @@ declare namespace DocumentUUIDField {
2720
2981
  }
2721
2982
 
2722
2983
  /**
2723
- * A special class of [StringField]{@link StringField} field which references another DataModel by its id.
2984
+ * A special class of {@link StringField | `StringField`} field which references another DataModel by its id.
2724
2985
  * This field may also be null to indicate that no foreign model is linked.
2725
2986
  * @typeParam DocumentType - the type of the foreign document constructor
2726
2987
  * @typeParam Options - the options for the ForeignDocumentField
@@ -2737,6 +2998,7 @@ declare namespace DocumentUUIDField {
2737
2998
  declare class ForeignDocumentField<
2738
2999
  DocumentType extends Document.AnyConstructor,
2739
3000
  Options extends ForeignDocumentField.Options = ForeignDocumentField.DefaultOptions,
3001
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2740
3002
  AssignmentType = ForeignDocumentField.AssignmentType<DocumentType, Options>,
2741
3003
  InitializedType = ForeignDocumentField.InitializedType<DocumentType, Options>,
2742
3004
  PersistedType extends string | null | undefined = ForeignDocumentField.PersistedType<Options>,
@@ -2776,13 +3038,13 @@ declare class ForeignDocumentField<
2776
3038
 
2777
3039
  declare namespace ForeignDocumentField {
2778
3040
  /** The options for the ForeignDocumentField class. */
2779
- type Options = StringField.Options &
2780
- DataField.Options<string | Document.Any> & {
2781
- // Making this ---------^ more concrete leads to excessively deep instantiation
2782
- idOnly?: boolean;
2783
- };
3041
+ // TODO(LukeAbby)
3042
+ interface Options extends StringField.Options<string | Document.Any> {
3043
+ // ^ Making this more concrete leads to excessively deep instantiation
3044
+ idOnly?: boolean;
3045
+ }
2784
3046
 
2785
- /** The type of the default options for the {@link ForeignDocumentField} class. */
3047
+ /** The type of the default options for the {@link ForeignDocumentField | `ForeignDocumentField`} class. */
2786
3048
  type DefaultOptions = SimpleMerge<
2787
3049
  DocumentIdField.DefaultOptions,
2788
3050
  {
@@ -2801,10 +3063,14 @@ declare namespace ForeignDocumentField {
2801
3063
  /**
2802
3064
  * A shorthand for the assignment type of a ForeignDocumentField class.
2803
3065
  * @typeParam Opts - the options that override the default options
3066
+ *
3067
+ * @deprecated - AssignmentType is being deprecated. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
3068
+ * for more details.
2804
3069
  */
2805
3070
  type AssignmentType<
2806
3071
  ConcreteDocument extends Document.AnyConstructor,
2807
3072
  Opts extends Options,
3073
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2808
3074
  > = DataField.DerivedAssignmentType<string | Document.ToConfiguredInstance<ConcreteDocument>, MergedOptions<Opts>>;
2809
3075
 
2810
3076
  /**
@@ -2827,7 +3093,7 @@ declare namespace ForeignDocumentField {
2827
3093
  }
2828
3094
 
2829
3095
  /**
2830
- * A special [StringField]{@link StringField} which records a standardized CSS color string.
3096
+ * A special {@link StringField | `StringField`} which records a standardized CSS color string.
2831
3097
  * @typeParam Options - the options of the ColorField instance
2832
3098
  * @typeParam AssignmentType - the type of the allowed assignment values of the ColorField
2833
3099
  * @typeParam InitializedType - the type of the initialized values of the ColorField
@@ -2841,6 +3107,7 @@ declare namespace ForeignDocumentField {
2841
3107
  */
2842
3108
  declare class ColorField<
2843
3109
  Options extends StringField.Options = ColorField.DefaultOptions,
3110
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2844
3111
  AssignmentType = ColorField.AssignmentType<Options>,
2845
3112
  InitializedType = ColorField.InitializedType<Options>,
2846
3113
  PersistedType extends string | null | undefined = ColorField.PersistedType<Options>,
@@ -2868,7 +3135,7 @@ declare class ColorField<
2868
3135
  }
2869
3136
 
2870
3137
  declare namespace ColorField {
2871
- /** The type of the default options for the {@link ColorField} class. */
3138
+ /** The type of the default options for the {@link ColorField | `ColorField`} class. */
2872
3139
  type DefaultOptions = SimpleMerge<
2873
3140
  StringField.DefaultOptions,
2874
3141
  {
@@ -2888,7 +3155,11 @@ declare namespace ColorField {
2888
3155
  /**
2889
3156
  * A shorthand for the assignment type of a ColorField class.
2890
3157
  * @typeParam Options - the options that override the default options
3158
+ *
3159
+ * @deprecated - AssignmentType is being deprecated. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
3160
+ * for more details.
2891
3161
  */
3162
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2892
3163
  type AssignmentType<Options extends StringField.Options> = DataField.DerivedAssignmentType<
2893
3164
  string,
2894
3165
  MergedOptions<Options>
@@ -2914,7 +3185,7 @@ declare namespace ColorField {
2914
3185
  }
2915
3186
 
2916
3187
  /**
2917
- * A special [StringField]{@link StringField} which records a file path or inline base64 data.
3188
+ * A special {@link StringField | `StringField`} which records a file path or inline base64 data.
2918
3189
  * @typeParam Options - the options of the FilePathField instance
2919
3190
  * @typeParam AssignmentType - the type of the allowed assignment values of the FilePathField
2920
3191
  * @typeParam InitializedType - the type of the initialized values of the FilePathField
@@ -2928,6 +3199,7 @@ declare namespace ColorField {
2928
3199
  */
2929
3200
  declare class FilePathField<
2930
3201
  Options extends FilePathField.Options = FilePathField.DefaultOptions,
3202
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
2931
3203
  AssignmentType = FilePathField.AssignmentType<Options>,
2932
3204
  InitializedType = FilePathField.InitializedType<Options>,
2933
3205
  PersistedType extends string | null | undefined = FilePathField.InitializedType<Options>,
@@ -2975,7 +3247,7 @@ declare class FilePathField<
2975
3247
  }
2976
3248
 
2977
3249
  declare namespace FilePathField {
2978
- /** The type of the default options for the {@link FilePathField} class. */
3250
+ /** The type of the default options for the {@link FilePathField | `FilePathField`} class. */
2979
3251
  type DefaultOptions = SimpleMerge<
2980
3252
  StringField.DefaultOptions,
2981
3253
  {
@@ -3017,7 +3289,11 @@ declare namespace FilePathField {
3017
3289
  /**
3018
3290
  * A shorthand for the assignment type of a FilePathField class.
3019
3291
  * @typeParam Options - the options that override the default options
3292
+ *
3293
+ * @deprecated - AssignmentType is being deprecated. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
3294
+ * for more details.
3020
3295
  */
3296
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3021
3297
  type AssignmentType<Options extends StringField.Options> = DataField.DerivedAssignmentType<
3022
3298
  string,
3023
3299
  MergedOptions<Options>
@@ -3034,7 +3310,7 @@ declare namespace FilePathField {
3034
3310
  }
3035
3311
 
3036
3312
  /**
3037
- * A special [NumberField]{@link NumberField} which represents an angle of rotation in degrees between 0 and 360.
3313
+ * A special {@link NumberField | `NumberField`} which represents an angle of rotation in degrees between 0 and 360.
3038
3314
  * @typeParam Options - the options of the AngleField instance
3039
3315
  * @typeParam AssignmentType - the type of the allowed assignment values of the AngleField
3040
3316
  * @typeParam InitializedType - the type of the initialized values of the AngleField
@@ -3048,6 +3324,7 @@ declare namespace FilePathField {
3048
3324
  */
3049
3325
  declare class AngleField<
3050
3326
  Options extends NumberField.Options = AngleField.DefaultOptions,
3327
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3051
3328
  AssignmentType = AngleField.AssignmentType<Options>,
3052
3329
  InitializedType = AngleField.InitializedType<Options>,
3053
3330
  PersistedType extends number | null | undefined = AngleField.InitializedType<Options>,
@@ -3079,7 +3356,7 @@ declare class AngleField<
3079
3356
  }
3080
3357
 
3081
3358
  declare namespace AngleField {
3082
- /** The type of the default options for the {@link AngleField} class. */
3359
+ /** The type of the default options for the {@link AngleField | `AngleField`} class. */
3083
3360
  type DefaultOptions = SimpleMerge<
3084
3361
  NumberField.DefaultOptions,
3085
3362
  {
@@ -3102,7 +3379,11 @@ declare namespace AngleField {
3102
3379
  /**
3103
3380
  * A shorthand for the assignment type of a AngleField class.
3104
3381
  * @typeParam Options - the options that override the default options
3382
+ *
3383
+ * @deprecated - AssignmentType is being deprecated. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
3384
+ * for more details.
3105
3385
  */
3386
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3106
3387
  type AssignmentType<Options extends NumberField.Options> = DataField.DerivedAssignmentType<
3107
3388
  number,
3108
3389
  MergedOptions<Options>
@@ -3119,7 +3400,7 @@ declare namespace AngleField {
3119
3400
  }
3120
3401
 
3121
3402
  /**
3122
- * A special [NumberField]{@link NumberField} represents a number between 0 and 1.
3403
+ * A special {@link NumberField | `NumberField`} represents a number between 0 and 1.
3123
3404
  * @typeParam Options - the options of the AlphaField instance
3124
3405
  * @typeParam AssignmentType - the type of the allowed assignment values of the AlphaField
3125
3406
  * @typeParam InitializedType - the type of the initialized values of the AlphaField
@@ -3133,6 +3414,7 @@ declare namespace AngleField {
3133
3414
  */
3134
3415
  declare class AlphaField<
3135
3416
  Options extends NumberField.Options = AlphaField.DefaultOptions,
3417
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3136
3418
  AssignmentType = AlphaField.AssignmentType<Options>,
3137
3419
  InitializedType = AlphaField.InitializedType<Options>,
3138
3420
  PersistedType extends number | null | undefined = AlphaField.InitializedType<Options>,
@@ -3159,7 +3441,7 @@ declare class AlphaField<
3159
3441
  }
3160
3442
 
3161
3443
  declare namespace AlphaField {
3162
- /** The type of the default options for the {@link AlphaField} class. */
3444
+ /** The type of the default options for the {@link AlphaField | `AlphaField`} class. */
3163
3445
  type DefaultOptions = SimpleMerge<
3164
3446
  NumberField.DefaultOptions,
3165
3447
  {
@@ -3181,7 +3463,11 @@ declare namespace AlphaField {
3181
3463
  /**
3182
3464
  * A shorthand for the assignment type of a AlphaField class.
3183
3465
  * @typeParam Options - the options that override the default options
3466
+ *
3467
+ * @deprecated - AssignmentType is being deprecated. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
3468
+ * for more details.
3184
3469
  */
3470
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3185
3471
  type AssignmentType<Options extends NumberField.Options> = DataField.DerivedAssignmentType<
3186
3472
  number,
3187
3473
  MergedOptions<Options>
@@ -3198,11 +3484,12 @@ declare namespace AlphaField {
3198
3484
  }
3199
3485
 
3200
3486
  /**
3201
- * A special [NumberField]{@link NumberField} represents a number between 0 (inclusive) and 1 (exclusive).
3487
+ * A special {@link NumberField | `NumberField`} represents a number between 0 (inclusive) and 1 (exclusive).
3202
3488
  * Its values are normalized (modulo 1) to the range [0, 1) instead of being clamped.
3203
3489
  */
3204
3490
  declare class HueField<
3205
3491
  const Options extends NumberField.Options = NumberField.DefaultOptions,
3492
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3206
3493
  const AssignmentType = NumberField.AssignmentType<Options>,
3207
3494
  const InitializedType = NumberField.InitializedType<Options>,
3208
3495
  const PersistedType extends number | null | undefined = NumberField.InitializedType<Options>,
@@ -3229,7 +3516,7 @@ declare namespace HueField {
3229
3516
  }
3230
3517
 
3231
3518
  /**
3232
- * A special [ObjectField]{@link ObjectField} which captures a mapping of User IDs to Document permission levels.
3519
+ * A special {@link ObjectField | `ObjectField`} which captures a mapping of User IDs to Document permission levels.
3233
3520
  * @typeParam Options - the options of the DocumentOwnershipField instance
3234
3521
  * @typeParam AssignmentType - the type of the allowed assignment values of the DocumentOwnershipField
3235
3522
  * @typeParam InitializedType - the type of the initialized values of the DocumentOwnershipField
@@ -3243,6 +3530,7 @@ declare namespace HueField {
3243
3530
  */
3244
3531
  declare class DocumentOwnershipField<
3245
3532
  Options extends DocumentOwnershipField.Options = DocumentOwnershipField.DefaultOptions,
3533
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3246
3534
  AssignmentType = DocumentOwnershipField.AssignmentType<Options>,
3247
3535
  InitializedType = DocumentOwnershipField.InitializedType<Options>,
3248
3536
  PersistedType extends
@@ -3268,7 +3556,7 @@ declare namespace DocumentOwnershipField {
3268
3556
  /** A shorthand for the options of a DocumentOwnershipField class. */
3269
3557
  type Options = DataField.Options<Record<string, DOCUMENT_OWNERSHIP_LEVELS>>;
3270
3558
 
3271
- /** The type of the default options for the {@link DocumentOwnershipField} class. */
3559
+ /** The type of the default options for the {@link DocumentOwnershipField | `DocumentOwnershipField`} class. */
3272
3560
  type DefaultOptions = SimpleMerge<
3273
3561
  ObjectField.DefaultOptions,
3274
3562
  {
@@ -3286,7 +3574,11 @@ declare namespace DocumentOwnershipField {
3286
3574
  /**
3287
3575
  * A shorthand for the assignment type of a ObjectField class.
3288
3576
  * @typeParam Opts - the options that override the default options
3577
+ *
3578
+ * @deprecated - AssignmentType is being deprecated. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
3579
+ * for more details.
3289
3580
  */
3581
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3290
3582
  type AssignmentType<Opts extends Options> = DataField.DerivedAssignmentType<
3291
3583
  Record<string, DOCUMENT_OWNERSHIP_LEVELS>,
3292
3584
  MergedOptions<Opts>
@@ -3303,7 +3595,7 @@ declare namespace DocumentOwnershipField {
3303
3595
  }
3304
3596
 
3305
3597
  /**
3306
- * A special [StringField]{@link StringField} which contains serialized JSON data.
3598
+ * A special {@link StringField | `StringField`} which contains serialized JSON data.
3307
3599
  * @typeParam Options - the options of the JSONField instance
3308
3600
  * @typeParam AssignmentType - the type of the allowed assignment values of the JSONField
3309
3601
  * @typeParam InitializedType - the type of the initialized values of the JSONField
@@ -3318,6 +3610,7 @@ declare namespace DocumentOwnershipField {
3318
3610
  declare class JSONField<
3319
3611
  // TODO(LukeAbby): Due to the unconditional setting of `blank`, `trim`, and `choices` setting them is meaningless which basically means they're removed from the options.
3320
3612
  Options extends StringField.Options = JSONField.DefaultOptions,
3613
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3321
3614
  AssignmentType = JSONField.AssignmentType<Options>,
3322
3615
  InitializedType = JSONField.InitializedType<Options>,
3323
3616
  PersistedType extends string | null | undefined = JSONField.PersistedType<Options>,
@@ -3376,7 +3669,7 @@ declare class JSONField<
3376
3669
  }
3377
3670
 
3378
3671
  declare namespace JSONField {
3379
- /** The type of the default options for the {@link JSONField} class. */
3672
+ /** The type of the default options for the {@link JSONField | `JSONField`} class. */
3380
3673
  type DefaultOptions = SimpleMerge<
3381
3674
  StringField.DefaultOptions,
3382
3675
  {
@@ -3395,7 +3688,11 @@ declare namespace JSONField {
3395
3688
  /**
3396
3689
  * A shorthand for the assignment type of a JSONField class.
3397
3690
  * @typeParam Options - the options that override the default options
3691
+ *
3692
+ * @deprecated - AssignmentType is being deprecated. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
3693
+ * for more details.
3398
3694
  */
3695
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3399
3696
  type AssignmentType<Options extends StringField.Options> = DataField.DerivedAssignmentType<
3400
3697
  string,
3401
3698
  MergedOptions<Options>
@@ -3421,7 +3718,7 @@ declare namespace JSONField {
3421
3718
  }
3422
3719
 
3423
3720
  /**
3424
- * A special subclass of {@link DataField} which can contain any value of any type.
3721
+ * A special subclass of {@link DataField | `DataField`} which can contain any value of any type.
3425
3722
  * Any input is accepted and is treated as valid.
3426
3723
  * It is not recommended to use this class except for very specific circumstances.
3427
3724
  */
@@ -3436,7 +3733,7 @@ declare class AnyField extends DataField<DataField.Options.Any, unknown, unknown
3436
3733
  }
3437
3734
 
3438
3735
  /**
3439
- * A subclass of [StringField]{@link StringField} which contains a sanitized HTML string.
3736
+ * A subclass of {@link StringField | `StringField`} which contains a sanitized HTML string.
3440
3737
  * This class does not override any StringField behaviors, but is used by the server-side to identify fields which
3441
3738
  * require sanitization of user input.
3442
3739
  * @typeParam Options - the options of the HTMLField instance
@@ -3452,6 +3749,7 @@ declare class AnyField extends DataField<DataField.Options.Any, unknown, unknown
3452
3749
  */
3453
3750
  declare class HTMLField<
3454
3751
  Options extends StringField.Options = HTMLField.DefaultOptions,
3752
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3455
3753
  AssignmentType = HTMLField.AssignmentType<Options>,
3456
3754
  InitializedType = HTMLField.InitializedType<Options>,
3457
3755
  PersistedType extends string | null | undefined = HTMLField.InitializedType<Options>,
@@ -3490,7 +3788,7 @@ declare class HTMLField<
3490
3788
  }
3491
3789
 
3492
3790
  declare namespace HTMLField {
3493
- /** The type of the default options for the {@link HTMLField} class. */
3791
+ /** The type of the default options for the {@link HTMLField | `HTMLField`} class. */
3494
3792
  type DefaultOptions = SimpleMerge<
3495
3793
  StringField.DefaultOptions,
3496
3794
  {
@@ -3508,7 +3806,11 @@ declare namespace HTMLField {
3508
3806
  /**
3509
3807
  * A shorthand for the assignment type of a HTMLField class.
3510
3808
  * @typeParam Options - the options that override the default options
3809
+ *
3810
+ * @deprecated - AssignmentType is being deprecated. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
3811
+ * for more details.
3511
3812
  */
3813
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3512
3814
  type AssignmentType<Options extends StringField.Options> = DataField.DerivedAssignmentType<
3513
3815
  string,
3514
3816
  MergedOptions<Options>
@@ -3528,7 +3830,7 @@ declare namespace HTMLField {
3528
3830
  }
3529
3831
 
3530
3832
  /**
3531
- * A subclass of {@link NumberField} which is used for storing integer sort keys.
3833
+ * A subclass of {@link NumberField | `NumberField`} which is used for storing integer sort keys.
3532
3834
  * @typeParam Options - the options of the IntegerSortField instance
3533
3835
  * @typeParam AssignmentType - the type of the allowed assignment values of the IntegerSortField
3534
3836
  * @typeParam InitializedType - the type of the initialized values of the IntegerSortField
@@ -3542,6 +3844,7 @@ declare namespace HTMLField {
3542
3844
  */
3543
3845
  declare class IntegerSortField<
3544
3846
  Options extends NumberField.Options = IntegerSortField.DefaultOptions,
3847
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3545
3848
  AssignmentType = IntegerSortField.AssignmentType<Options>,
3546
3849
  InitializedType = IntegerSortField.InitializedType<Options>,
3547
3850
  PersistedType extends number | null | undefined = IntegerSortField.InitializedType<Options>,
@@ -3566,7 +3869,7 @@ declare class IntegerSortField<
3566
3869
  }
3567
3870
 
3568
3871
  declare namespace IntegerSortField {
3569
- /** The type of the default options for the {@link IntegerSortField} class. */
3872
+ /** The type of the default options for the {@link IntegerSortField | `IntegerSortField`} class. */
3570
3873
  type DefaultOptions = SimpleMerge<
3571
3874
  DataField.DefaultOptions,
3572
3875
  {
@@ -3588,7 +3891,11 @@ declare namespace IntegerSortField {
3588
3891
  /**
3589
3892
  * A shorthand for the assignment type of a IntegerSortField class.
3590
3893
  * @typeParam Options - the options that override the default options
3894
+ *
3895
+ * @deprecated - AssignmentType is being deprecated. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
3896
+ * for more details.
3591
3897
  */
3898
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3592
3899
  type AssignmentType<Options extends NumberField.Options> = DataField.DerivedAssignmentType<
3593
3900
  number,
3594
3901
  MergedOptions<Options>
@@ -3605,7 +3912,7 @@ declare namespace IntegerSortField {
3605
3912
  }
3606
3913
 
3607
3914
  /**
3608
- * A subclass of {@link SchemaField} which stores document metadata in the _stats field.
3915
+ * A subclass of {@link SchemaField | `SchemaField`} which stores document metadata in the _stats field.
3609
3916
  * @typeParam Options - the options of the DocumentStatsField instance
3610
3917
  * @typeParam AssignmentType - the type of the allowed assignment values of the DocumentStatsField
3611
3918
  * @typeParam InitializedType - the type of the initialized values of the DocumentStatsField
@@ -3629,6 +3936,7 @@ declare namespace IntegerSortField {
3629
3936
  */
3630
3937
  declare class DocumentStatsField<
3631
3938
  Options extends DocumentStatsField.Options = DocumentStatsField.DefaultOptions,
3939
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3632
3940
  AssignmentType = DocumentStatsField.AssignmentType<Options>,
3633
3941
  InitializedType = DocumentStatsField.InitializedType<Options>,
3634
3942
  PersistedType extends AnyObject | null | undefined = DocumentStatsField.PersistedType<Options>,
@@ -3638,13 +3946,15 @@ declare class DocumentStatsField<
3638
3946
 
3639
3947
  declare namespace DocumentStatsField {
3640
3948
  /** A shorthand for the options of a DocumentStatsField class. */
3641
- type Options = DataField.Options<SchemaField.InnerAssignmentType<Schema>>;
3949
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3950
+ type Options = DataField.Options<SchemaField.AssignmentData<Schema>>;
3642
3951
 
3643
- /** The type of the default options for the {@link DocumentStatsField} class. */
3644
- type DefaultOptions = SimpleMerge<SchemaField.DefaultOptions, { initial: SchemaField.InnerAssignmentType<Schema> }>;
3952
+ /** The type of the default options for the {@link DocumentStatsField | `DocumentStatsField`} class. */
3953
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3954
+ type DefaultOptions = SimpleMerge<SchemaField.DefaultOptions, { initial: SchemaField.AssignmentData<Schema> }>;
3645
3955
 
3646
3956
  /**
3647
- * A helper type for the given options type merged into the default options of the {@link DocumentStatsField} class.
3957
+ * A helper type for the given options type merged into the default options of the {@link DocumentStatsField | `DocumentStatsField`} class.
3648
3958
  * @typeParam Opts - the options that override the default options
3649
3959
  */
3650
3960
  type MergedOptions<Opts extends Options> = SimpleMerge<DefaultOptions, Opts>;
@@ -3652,9 +3962,14 @@ declare namespace DocumentStatsField {
3652
3962
  /**
3653
3963
  * A shorthand for the assignment type of a DocumentStatsField class.
3654
3964
  * @typeParam Opts - the options that override the default options
3965
+ *
3966
+ * @deprecated - AssignmentType is being deprecated. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
3967
+ * for more details.
3655
3968
  */
3969
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3656
3970
  type AssignmentType<Opts extends Options = DefaultOptions> = DataField.DerivedAssignmentType<
3657
- SchemaField.InnerAssignmentType<Schema>,
3971
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3972
+ SchemaField.AssignmentData<Schema>,
3658
3973
  MergedOptions<Opts>
3659
3974
  >;
3660
3975
 
@@ -3663,7 +3978,7 @@ declare namespace DocumentStatsField {
3663
3978
  * @typeParam Opts - the options that override the default options
3664
3979
  */
3665
3980
  type InitializedType<Opts extends Options = DefaultOptions> = DataField.DerivedInitializedType<
3666
- SchemaField.InnerInitializedType<Schema>,
3981
+ SchemaField.InitializedData<Schema>,
3667
3982
  MergedOptions<Opts>
3668
3983
  >;
3669
3984
 
@@ -3672,13 +3987,24 @@ declare namespace DocumentStatsField {
3672
3987
  * @typeParam Opts - the options that override the default options
3673
3988
  */
3674
3989
  type PersistedType<Opts extends Options = DefaultOptions> = DataField.DerivedInitializedType<
3675
- SchemaField.InnerPersistedType<Schema>,
3990
+ SchemaField.SourceData<Schema>,
3676
3991
  MergedOptions<Opts>
3677
3992
  >;
3678
3993
 
3679
- type ConstructorData = SchemaField.InnerConstructorType<Schema>;
3680
- type Properties = SchemaField.InnerInitializedType<Schema>;
3681
- type Source = SchemaField.InnerPersistedType<Schema>;
3994
+ interface CreateData extends SchemaField.CreateData<Schema> {}
3995
+
3996
+ interface InitializedData extends SchemaField.InitializedData<Schema> {}
3997
+
3998
+ interface SourceData extends SchemaField.SourceData<Schema> {}
3999
+
4000
+ /** @deprecated {@link DocumentStatsField.CreateData | `DocumentStatsField.CreateData`} */
4001
+ type ConstructorData = CreateData;
4002
+
4003
+ /** @deprecated {@link DocumentStatsField.InitializedData | `DocumentStatsField.InitializedData`} */
4004
+ type Properties = SchemaField.InitializedData<Schema>;
4005
+
4006
+ /** @deprecated {@link DocumentStatsField.SourceData | `DocumentStatsField.SourceData`} */
4007
+ type Source = SchemaField.SourceData<Schema>;
3682
4008
 
3683
4009
  interface Schema extends DataSchema {
3684
4010
  /**
@@ -3723,11 +4049,12 @@ declare namespace DocumentStatsField {
3723
4049
  }
3724
4050
 
3725
4051
  /**
3726
- * A subclass of [StringField]{@link StringField} that is used specifically for the Document "type" field.
4052
+ * A subclass of {@link StringField | `StringField`} that is used specifically for the Document "type" field.
3727
4053
  */
3728
4054
  declare class DocumentTypeField<
3729
4055
  const ConcreteDocumentClass extends Document.AnyConstructor,
3730
4056
  const Options extends DocumentTypeField.Options = DocumentTypeField.DefaultOptions,
4057
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3731
4058
  const AssignmentType = DocumentTypeField.AssignmentType<ConcreteDocumentClass, Options>,
3732
4059
  const InitializedType = DocumentTypeField.InitializedType<ConcreteDocumentClass, Options>,
3733
4060
  const PersistedType extends string | null | undefined = DocumentTypeField.InitializedType<
@@ -3756,7 +4083,7 @@ declare class DocumentTypeField<
3756
4083
  }
3757
4084
 
3758
4085
  declare namespace DocumentTypeField {
3759
- /** The type of the default options for the {@link DocumentTypeField} class. */
4086
+ /** The type of the default options for the {@link DocumentTypeField | `DocumentTypeField`} class. */
3760
4087
  type DefaultOptions = SimpleMerge<
3761
4088
  StringField.DefaultOptions,
3762
4089
  {
@@ -3780,14 +4107,21 @@ declare namespace DocumentTypeField {
3780
4107
  }
3781
4108
  >;
3782
4109
 
4110
+ /**
4111
+ * @deprecated - AssignmentType is being deprecated. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
4112
+ * for more details.
4113
+ */
3783
4114
  type AssignmentType<
3784
4115
  ConcreteDocumentClass extends Document.AnyConstructor,
3785
4116
  Options extends StringField.Options,
4117
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3786
4118
  > = StringField.AssignmentType<MergedOptions<ConcreteDocumentClass, Options>>;
4119
+
3787
4120
  type InitializedType<
3788
4121
  ConcreteDocumentClass extends Document.AnyConstructor,
3789
4122
  Options extends StringField.Options,
3790
4123
  > = StringField.InitializedType<MergedOptions<ConcreteDocumentClass, Options>>;
4124
+
3791
4125
  type PersistedType<
3792
4126
  ConcreteDocumentClass extends Document.AnyConstructor,
3793
4127
  Options extends StringField.Options,
@@ -3795,7 +4129,7 @@ declare namespace DocumentTypeField {
3795
4129
  }
3796
4130
 
3797
4131
  /**
3798
- * A subclass of [ObjectField]{@link ObjectField} which supports a type-specific data object.
4132
+ * A subclass of {@link ObjectField | `ObjectField`} which supports a type-specific data object.
3799
4133
  * @typeParam DocumentType - the type of the embedded Document
3800
4134
  * @typeParam Options - the options of the TypeDataField instance
3801
4135
  * @typeParam AssignmentType - the type of the allowed assignment values of the TypeDataField
@@ -3811,6 +4145,7 @@ declare namespace DocumentTypeField {
3811
4145
  declare class TypeDataField<
3812
4146
  const SystemDocument extends Document.SystemConstructor,
3813
4147
  const Options extends TypeDataField.Options<SystemDocument> = TypeDataField.DefaultOptions,
4148
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3814
4149
  const AssignmentType = TypeDataField.AssignmentType<SystemDocument, Options>,
3815
4150
  const InitializedType = TypeDataField.InitializedType<SystemDocument, Options>,
3816
4151
  const PersistedType extends AnyObject | null | undefined = TypeDataField.PersistedType<SystemDocument, Options>,
@@ -3885,10 +4220,11 @@ declare namespace TypeDataField {
3885
4220
  * @typeParam DocumentType - the type of the embedded Document
3886
4221
  */
3887
4222
  type Options<DocumentType extends Document.SystemConstructor> = DataField.Options<
3888
- SchemaField.InnerAssignmentType<DataModel.SchemaOfClass<DocumentType>>
4223
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
4224
+ SchemaField.AssignmentData<DataModel.SchemaOfClass<DocumentType>>
3889
4225
  >;
3890
4226
 
3891
- /** The type of the default options for the {@link TypeDataField} class. */
4227
+ /** The type of the default options for the {@link TypeDataField | `TypeDataField`} class. */
3892
4228
  type DefaultOptions = SimpleMerge<
3893
4229
  ObjectField.DefaultOptions,
3894
4230
  {
@@ -3914,10 +4250,14 @@ declare namespace TypeDataField {
3914
4250
  * A shorthand for the assignment type of a TypeDataField class.
3915
4251
  * @typeParam DocumentType - the type of the embedded Document
3916
4252
  * @typeParam Options - the options that override the default options
4253
+ *
4254
+ * @deprecated - AssignmentType is being deprecated. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
4255
+ * for more details.
3917
4256
  */
3918
4257
  type AssignmentType<
3919
4258
  SystemDocumentConstructor extends Document.SystemConstructor,
3920
4259
  Opts extends Options<SystemDocumentConstructor>,
4260
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3921
4261
  > = DataField.DerivedAssignmentType<AnyObject, MergedOptions<SystemDocumentConstructor, Opts>>;
3922
4262
 
3923
4263
  /**
@@ -3929,27 +4269,14 @@ declare namespace TypeDataField {
3929
4269
  SystemDocumentConstructor extends Document.SystemConstructor,
3930
4270
  Opts extends Options<SystemDocumentConstructor>,
3931
4271
  > = DataField.DerivedInitializedType<
3932
- _Instances<DataModelsFor<SystemDocumentConstructor["metadata"]["name"]>> | UnknownSystem,
4272
+ _Instances<DataModelsFor<SystemDocumentConstructor["metadata"]["name"]>> | Document.UnknownSystem,
3933
4273
  MergedOptions<SystemDocumentConstructor, Opts>
3934
4274
  >;
3935
4275
 
4276
+ /** @internal */
3936
4277
  type _Instances<T> = {
3937
- [K in keyof T]: T[K] extends (abstract new (arg0: never, ...args: never[]) => infer U extends DataModel.Any)
3938
- ? U
3939
- : never;
3940
- };
3941
-
3942
- /**
3943
- * With the existence of custom module subtypes a system can no longer rely on their configured types being the only ones.
3944
- * A module can provide its own custom type though it is always of the form `${moduleName}.${subType}` so the `.` is a pretty
3945
- * strong indicator.
3946
- *
3947
- * `UnknownSourceData` covers the case where it's configured without a data model.
3948
- * See {@link UnknownSystem | `UnknownSystem`} for other possibilities.
3949
- */
3950
- interface UnknownSourceData extends AnyObject {
3951
- type: `${string}.${string}`;
3952
- }
4278
+ [K in keyof T]: T[K] extends (abstract new (...args: never) => infer U extends DataModel.Any) ? U : never;
4279
+ }[keyof T];
3953
4280
 
3954
4281
  /**
3955
4282
  * With the existence of custom module subtypes a system can no longer rely on their configured types being the only ones.
@@ -3961,21 +4288,6 @@ declare namespace TypeDataField {
3961
4288
  */
3962
4289
  interface UnknownTypeDataModel extends TypeDataModel<any, any, any, any> {}
3963
4290
 
3964
- /**
3965
- * With the existence of custom module subtypes a system can no longer rely on their configured types being the only ones.
3966
- *
3967
- * `UnknownDataModel` covers the case where it's configured with a {@link DataModel | `DataModel`}.
3968
- * Using a {@link TypeDataModel | `TypeDataModel`} is recommended by Foundry but a {@link DataModel | `DataModel`} is
3969
- * always possible.
3970
- * See {@link UnknownSystem | `UnknownSystem`} for other possibilities.
3971
- */
3972
- interface UnknownDataModel extends DataModel<any, any, any> {}
3973
-
3974
- /**
3975
- * With the existence of custom module subtypes a system can no longer rely on their configured types being the only ones.
3976
- */
3977
- type UnknownSystem = UnknownSourceData | UnknownTypeDataModel | UnknownDataModel;
3978
-
3979
4291
  /**
3980
4292
  * A shorthand for the persisted type of a TypeDataField class.
3981
4293
  * @typeParam DocumentType - the type of the embedded Document
@@ -3988,11 +4300,12 @@ declare namespace TypeDataField {
3988
4300
  }
3989
4301
 
3990
4302
  /**
3991
- * A subclass of [DataField]{@link DataField} which allows to typed schemas.
4303
+ * A subclass of {@link DataField | `DataField`} which allows to typed schemas.
3992
4304
  */
3993
4305
  declare class TypedSchemaField<
3994
4306
  const Types extends TypedSchemaField.Types,
3995
4307
  const Options extends TypedSchemaField.Options<Types> = TypedSchemaField.DefaultOptions,
4308
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
3996
4309
  const AssignmentType = TypedSchemaField.AssignmentType<Types, Options>,
3997
4310
  const InitializedType = TypedSchemaField.InitializedType<Types, Options>,
3998
4311
  const PersistedType = TypedSchemaField.PersistedType<Types, Options>,
@@ -4088,12 +4401,18 @@ declare namespace TypedSchemaField {
4088
4401
  * @internal
4089
4402
  */
4090
4403
  type _AssignmentType<Types extends ConfiguredTypes> = {
4404
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
4091
4405
  [K in keyof Types]: DataField.AssignmentTypeFor<Types[K]> & { type: K };
4092
4406
  }[keyof Types];
4093
4407
 
4408
+ /**
4409
+ * @deprecated - AssignmentType is being deprecated. See {@link SchemaField.AssignmentData | `SchemaField.AssignmentData`}
4410
+ * for more details.
4411
+ */
4094
4412
  type AssignmentType<
4095
4413
  Types extends TypedSchemaField.Types,
4096
4414
  Options extends TypedSchemaField.Options<Types>,
4415
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
4097
4416
  > = DataField.DerivedAssignmentType<_AssignmentType<ToConfiguredTypes<Types>>, Options>;
4098
4417
 
4099
4418
  /**
@@ -4159,6 +4478,7 @@ declare namespace ModelValidationError {
4159
4478
  // directives that could mask other errors.
4160
4479
  declare class _InternalJavaScriptField<
4161
4480
  const Options extends JavaScriptField.Options = JavaScriptField.DefaultOptions,
4481
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
4162
4482
  const AssignmentType = StringField.AssignmentType<Options>,
4163
4483
  const InitializedType = StringField.InitializedType<Options>,
4164
4484
  const PersistedType extends string | null | undefined = StringField.InitializedType<Options>,
@@ -4169,10 +4489,11 @@ declare class _InternalJavaScriptField<
4169
4489
  }
4170
4490
 
4171
4491
  /**
4172
- * A subclass of {@link StringField} which contains JavaScript code.
4492
+ * A subclass of {@link StringField | `StringField`} which contains JavaScript code.
4173
4493
  */
4174
4494
  declare class JavaScriptField<
4175
4495
  const Options extends JavaScriptField.Options = JavaScriptField.DefaultOptions,
4496
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
4176
4497
  const AssignmentType = StringField.AssignmentType<Options>,
4177
4498
  const InitializedType = StringField.InitializedType<Options>,
4178
4499
  const PersistedType extends string | null | undefined = StringField.InitializedType<Options>,