Closed xaviervalarino closed 1 year ago
Hi @xaviervalarino, I believe the reason typescript is unhappy here is because not all types in documentChanges
have a "properties" attribute.
Here's more information on all the different types of changes that might appear in e.documentChanges: https://www.figma.com/plugin-docs/api/DocumentChange/
Try this instead:
figma.on("documentchange", (e) => {
for (const change of e.documentChanges) {
if (change.type === "PROPERTY_CHANGE") {
const properties = change.properties;
// DO STUFF
}
}
});
That fixed it. Thank you very much
Been getting this error while subscribing to the
documentchange
event, but I know it's in the docs and in the log.I tried:
but that didn't do much.
I'm using
node v19.6.0