There is no Plugin API bug here. This code works as expected and you can check it yourself (just run the plugin with this code). You are getting this Typescript error only in your IDE. I can’t tell you for sure because I don’t use Typescript, but it looks like you should follow the rules and syntax of that language.
Usual arrow. I just used type conversion 🙂 as FontName
I just used type conversion : ) as FontName
@tank666
First of all, I’m using the IDE recommended by Figma.
Secondly, I picked the code exactly from Figma’s API docs, I’m sure there’s no syntax error there.
Thirdly, I did run the plugin, it’s not working.
@user_of_figma_mikita
I ended up doing that and it worked. Thanks ❤️❤️
As I said, this code works as expected.