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

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

Look into the typing of `Hooks.on` #2906

Open LukeAbby opened 3 weeks ago

LukeAbby commented 3 weeks ago

The typing is pretty close to ideal but especially the "dynamic callbacks" could be improved and ideally limits the usage of overrides.

Also SceneManager#registerHooks needs to match this type.

LukeAbby commented 3 weeks ago

For example the hook preCreate${DocumentType} should correspond to a hook for that specific document.