plugin-typings icon indicating copy to clipboard operation
plugin-typings copied to clipboard

`variantProperties` can also be a string

Open flenter opened this issue 3 years ago • 1 comments

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;
  }

flenter avatar Nov 04 '21 22:11 flenter

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.

ghost avatar Aug 01 '22 11:08 ghost

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.

rohitchouhan8 avatar Jan 05 '24 19:01 rohitchouhan8