Skip to main content
Solved

Missing API properties and functions

  • December 19, 2022
  • 2 replies
  • 1027 views

rob-redbar

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!

Best answer by Gleb

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

View original

2 replies

Gleb
  • Power Member
  • 4708 replies
  • Answer
  • December 20, 2022

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


rob-redbar
  • Author
  • 6 replies
  • December 20, 2022

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings