figma / plugin-typings

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

Update types for Component Properties support #139

Closed trev4ev closed 2 years ago

trev4ev commented 2 years ago

Types have been updated to match changes to the plugin API documentation for component properties here. Here is the paper doc for changes being made to the documentation.

Confirmed that running the tests in /plugin-docs/tests passes with these new types but will hold on merging this PR until the PR linked above is finalized and approved (but not merged).

ghost commented 2 years ago

Hi !!

I`m having errors trying to access component properties. It seams like new features are incompatible with old instances from a selected component. Creating a brand new one and its variant seams to work. Do anyone has a clue for that?


Error: in get_componentProperties: Component set for node has existing errors
    at InstanceNode.get_componentProperties [as componentProperties] (eval at <anonymous> (eval at createScopedEvaluatorFactory (b6e7a4b8-159c-41a3-a563-458c9f69cd28:1:1)), <anonymous>:23:21)
ghost commented 2 years ago

Hummm found it: this happens when we have the Variant Properties and Values conflicting.