plugin-typings
plugin-typings copied to clipboard
`variantProperties` can also be a string
It can be set to Component set for node has existing errors
. This happens when you have invalid/duplicate variant(names).
The type definition should be something in the line of:
interface VariantMixin {
readonly variantProperties: { [property: string]: string } | null | string
}
or:
// I am unsure if this is allowed in a type definitions file
const VariantErrorMessage = "Component set for node has existing errors";
interface VariantMixin {
readonly variantProperties: { [property: string]: string } | null | typeof VariantErrorMessage;
}
It seams everytime we have an error from Figma, variantProperties (that is deprecated btw) changes its type to string to bring error messages. I saw this occuring this week, when trying to get instances with conflict errors.
Because this question is related to a now deprecated API, I'm going to close this issue out. If you have issues with the new API componentProperties
, please feel free to open a new issue.