League-of-Foundry-Developers / foundry-vtt-types

Unofficial type declarations for the Foundry Virtual Tabletop API
MIT License
116 stars 56 forks source link

Improve typing of Document#collections #2556

Closed JPMeehan closed 4 months ago

JPMeehan commented 4 months ago

Currently, Document#collections has no idea what the corresponding key: collection pairs are. This is theoretically derivable from the metadata; these also should just match 1:1 with properties on the actual document itself. For example, Combat["collections"]["combatants"] should be equal in type to Combat["combatants"].