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

Unofficial type declarations for the Foundry Virtual Tabletop API
MIT License
111 stars 52 forks source link

Update common/types.d.mts for v12 #2600

Closed DenWav closed 4 weeks ago

JPMeehan commented 1 month ago

Can you expand this PR to checking for any other updates to the class? That would let us cross it off the list rather than have a piecemeal implementation

DenWav commented 1 month ago

I'll give it my best shot :)

DenWav commented 1 month ago

SettingConfig has requiresReload and filePicker defined in the typescript definition which doesn't appear in foundry's typedef - I noticed that was also true for v11 so kept them in there. I'm not sure if that's intentional, though.

Same applies to SettingSubmenuConfig with key and namespace.

I also added 3 new TODOs, which we might want to address before merging this PR.

JPMeehan commented 1 month ago

Would close #2675

LukeAbby commented 4 weeks ago

@JPMeehan I'd be in support of moving types like DocumentConstructionContext into better homes, yes.

Probably stuff like moving to DocumentCollection.ConstructionContext while still having DocumentConstructionContext stick around but unexported solely for reference.

I'd make this a new issue though. This does mean we might not want to close #2675 straight away but I'd like to be respectful of the fact that this PR has already gone through review and was ready to be merged under our initial requirements. I also think it may be best if I do it because I want to understand exactly where everything is moving to and why it's best there. This makes me feel as if I should simply do it myself because otherwise I'm just putting other people under unnecessary effort.

JPMeehan commented 4 weeks ago

@LukeAbby I think I'm good with "Accept this MR, but leave #2675 open". Especially since DocumentModificationContext needs to be replaced but shouldn't yet in this MR due to the base documents not yet being updated.