Missing API properties and functions

const user = figma.currentUser;

Getting this error:
Property 'currentUser' does not exist on type 'PluginAPI'.

Same for commitUndo() and triggerUndo() and a bunch more. NPM installed v1.0.4.

  "devDependencies": {
    "@types/figma": "^1.0.4”,

Has anyone encountered this before? Thanks!

That lib is very outdated. Use the official typings: @figma/plugin-typings - npm

1 Like

@Gleb thank you! I am using a boilerplate typescript project that seems to be a bit old. Updating now.