and I got down to 16 files for reproducing the "RangeError: Maximum call stack size exceeded" error.

and I got down to 16 files for reproducing the "RangeError: Maximum call stack size exceeded" error. I can probably get lower too
9 Replies
Eon
Eon5mo ago
Progress is progress heh.
Unknown User
Unknown User5mo ago
Message Not Public
Sign In & Join Server To View
LukeAbby
LukeAbbyOP5mo ago
if you hover over the folders in game.folders what type does it say it is? eslint no-unsafe-assignment has some issues annoyingly
Unknown User
Unknown User5mo ago
Message Not Public
Sign In & Join Server To View
LukeAbby
LukeAbbyOP5mo ago
Yeah you're having an issue then if you run npx tsc in your terminal do any errors show up?
Unknown User
Unknown User5mo ago
Message Not Public
Sign In & Join Server To View
LukeAbby
LukeAbbyOP5mo ago
Okay let me see if I can reproduce Okay I found the issue This is an issue with the builtin InstanceType of all things lol They write this:
type InstanceType<T extends abstract new (...args: any) => any> = T extends abstract new (...args: any) => infer R ? R : any;
type InstanceType<T extends abstract new (...args: any) => any> = T extends abstract new (...args: any) => infer R ? R : any;
you can see the : any and that's what you're getting this I became aware of this and started rolling out mitigations before anyone even reported it but unfortunately I missed one spot And of course also started using more code that hits this InstanceType edge case game.folders hasn't been broken for long
Unknown User
Unknown User5mo ago
Message Not Public
Sign In & Join Server To View
LukeAbby
LukeAbbyOP5mo ago
Haha yeah it's, let's say, underdocumented it's the next thing on my list; #Foundry VTT Types Announcements

Did you find this page helpful?