As I attempt to follow the plugin setup guide located here, my plugin is quite simple yet effective. It consists of the following code:
figma.showUI(__html__);
// @ts-ignore
console.log(figma.currentPage.selection[0].cornerRadius);
When executed as is, the plugin functions correctly and retrieves the border radius of the selected node.
However, upon removal of // @ts-ignore
, TypeScript raises an error: "Property 'cornerRadius' does not exist on type 'SceneNode'."
I have properly installed the typings, from the source here, and my .tsconfig file is structured like this:
{
"compilerOptions": {
"target": "es6",
"lib": ["es6", "dom"],
"typeRoots": [
"./node_modules/@types",
"./node_modules/@figma"
]
}
}
What element am I overlooking?