Can you access `figma.xxxx` outside of plugin.ts?

I’m using WebPack and having good results using multiple .ts files which get bundled into ui.ts. But I haven’t found a way to access figma.xxxx properties and functions outside of plugin.ts – no way to import it.

Has anyone done something like this? Thanks!

You probably need to set up your IDE. I hope these resources help you:

https://www.figma.com/plugin-docs/setup

If for some reason you still can’t get hints from typing files, then you can try specifying the full path to the typing files by adding these lines to the top of your .js/.ts files:

/// <reference path="./node_modules/@figma/plugin-typings/index.d.ts" />
/// <reference path="./node_modules/@figma/plugin-typings/plugin-api.d.ts" />

thanks, @tank666 … watching now