Skip to content

Add plugin API write support for TIMING & EASING variable types #364

Description

@mck

createVariable and setValueForMode reject the TIMING/EASING variable types, and VariableResolvedDataType / VariableValue don't include them. Reading them already works (resolvedType, valuesByMode) — only writing is missing.

Request

  1. Add 'TIMING' | 'EASING' to VariableResolvedDataType
  2. Add their value shapes to VariableValue (TIMING = number; EASING = { easingType, bezierValues: { p1x, p1y, p2x, p2y }, springValues? }).
  3. Allow createVariable / setValueForMode to accept them at runtime.
figma.variables.createVariable('t', collection, 'TIMING') // and 'EASING'
// ✗ resolvedType failed validation: Expected 'BOOLEAN' | 'COLOR' | 'FLOAT' | 'STRING'

@figma/plugin-typings@1.130.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions