Variable types

Hello, variables are going to be fun! I wonder I can start playing around with them in the API but perhaps the Types have not been created yet as Im getting an typescript error:

figma.createVariableCollection("phrase");
Property 'createVariableCollection' does not exist on type 'PluginAPI'

Thanks in advance

No such method exists in the global figma object. It exists at the figma.variables property.

figma.variables.createVariableCollection(name)

Please refer to the developer documentation: