figma / plugin-typings

Typings for the Figma Plugin API
MIT License
195 stars 45 forks source link

[Request] add setting scopes feature on variables for plugins development purposes #297

Closed FotisVasilopoulos closed 3 months ago

FotisVasilopoulos commented 4 months ago

I am suggesting to add on VariablesAPI a scopes: Array argument on createVariable function (with ALL_SCOPES as default) or/and a setVariableScopes(scopes: Array) on Variable, in order to utilize better importing variables from a plugin with predefined scopes

rohitchouhan8 commented 4 months ago

Hi, we do have a way to set variable scopes as described here: https://www.figma.com/plugin-docs/api/Variable/#scopes. I think this is the equivalent of setVariableScopes(scopes: Array) from your suggestion. If not, can you elaborate why?

elainefigma commented 3 months ago

Hi! Resolving due to lack of activity, but feel free to follow up if you have additional questions.