figma.annotations
These are all defined on figma.annotations
.
getAnnotationCategoriesAsync(): Promise<AnnotationCategory[]>
Returns a list of all AnnotationCategory
s that exist in the current file.
getAnnotationCategoryByIdAsync(id: string): Promise<AnnotationCategory | null>
Returns an AnnotationCategory
by its ID. If not found, returns a promise containing null.
addAnnotationCategoryAsync(categoryInput: { label: string; color: AnnotationCategoryColor }): Promise<AnnotationCategory>
Adds a new AnnotationCategory
.