Hey!
First of all, good job on the new API improvements. I am building something with variables and upon using figma.variables.createVariableAlias
, I found inconsistent behavior between the editor interface and this method.
Specifically, I am trying to assign variables to the InstanceNode (here, “Mode” prop key):
propertiest"Mode"] = figma.variables.createVariableAlias(variable)
This works, for string properties. For numeric properties, however, an error is thrown stating that the property that I am trying to assign can’t resolve to “string”. Now I assume this is because the API requires only string properties to be assigned (Working with Variables | Plugin API) - just an assumption - however this limitation doesn’t exist when using the editor:
In editor, numeric variable can be bound just fine. This is quite a big limitation, because any real conditionals will usually work with numbers.
Possibly I am missing something, but this seems like a bug in the SDK layer to me.
Thank you!