From acd5da13c47270aaa6a7efdc9d89d7706da576fd Mon Sep 17 00:00:00 2001 From: Avery Frankenberg Date: Thu, 27 Aug 2026 11:23:27 -0700 Subject: [PATCH] Restore getCSSAsync to public typings --- plugin-api-standalone.d.ts | 7 +++++++ plugin-api.d.ts | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/plugin-api-standalone.d.ts b/plugin-api-standalone.d.ts index 824dc0c..f0b5062 100644 --- a/plugin-api-standalone.d.ts +++ b/plugin-api-standalone.d.ts @@ -6249,6 +6249,13 @@ interface BaseNodeMixin extends PluginDataMixin, DevResourcesMixin { * Note: This property uses a set of heuristics to determine if a node is an asset. At a high level an icon is a small vector graphic and an image is a node with an image fill. */ readonly isAsset: boolean + /** + * Resolves to a JSON object of CSS properties of the node. This is the same CSS that Figma shows in the inspect panel and is helpful if you are building a [plugin for code generation](https://developers.figma.com/docs/plugins/codegen-plugins). + * + */ + getCSSAsync(): Promise<{ + [key: string]: string + }> /** * Returns the top-most frame that contains this node. If the node is not inside a frame, this will return undefined. * diff --git a/plugin-api.d.ts b/plugin-api.d.ts index 96d2b18..f97220e 100644 --- a/plugin-api.d.ts +++ b/plugin-api.d.ts @@ -6249,6 +6249,13 @@ interface BaseNodeMixin extends PluginDataMixin, DevResourcesMixin { * Note: This property uses a set of heuristics to determine if a node is an asset. At a high level an icon is a small vector graphic and an image is a node with an image fill. */ readonly isAsset: boolean + /** + * Resolves to a JSON object of CSS properties of the node. This is the same CSS that Figma shows in the inspect panel and is helpful if you are building a [plugin for code generation](https://developers.figma.com/docs/plugins/codegen-plugins). + * + */ + getCSSAsync(): Promise<{ + [key: string]: string + }> /** * Returns the top-most frame that contains this node. If the node is not inside a frame, this will return undefined. *