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.
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: