figma-api icon indicating copy to clipboard operation
figma-api copied to clipboard

Update "file.components" type

Open isaiahtaylor opened this issue 2 years ago • 0 comments

Hi, thank you so much for this fantastic library! I noticed that GetFileResult.components has this type:

/** An arrangement of published UI elements that can be instantiated across figma files */
export interface Component {
    /** The key of the component */
    key: string;
    /** The name of the component */
    name: string;
    /** The description of the component as entered in the editor */
    description: string;
}

However, here's the JSON output of a request:

{
    "componentSetId": "2:135",
    "description": "",
    "documentationLinks": [],
    "key": "<redacted>",
    "name": "name redacted"
}

You can see that "componentSetId" seems to be missing. Thanks!

isaiahtaylor avatar Jul 14 '22 15:07 isaiahtaylor