with just a parent class and the class name, is there a way to instantiate a new class?

JamesB and @veterini have a question for y'all in #coc7-dev https://discord.com/channels/732325252788387980/875688989137465355/899071918890704896
3 Replies
corporat
corporat3y ago
Threaded
ccjmk
ccjmk3y ago
Hmm Ghost gave me a piece of code a while for that, if I understood correctly the need:
const cls = getDocumentClass('Actor');
const actor = new cls(newActorData);
const cls = getDocumentClass('Actor');
const actor = new cls(newActorData);
I imagine getting other DocumentClasses by name should work
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View