@figma/plugin-typings
TypeScript icon, indicating that this package has built-in type declarations

1.91.0 • Public • Published

Figma Plugin API typings

npm

This repository contains the typings for the Figma Plugin API.

Usage

  1. Installation

    npm i --save-dev @figma/plugin-typings
    # or
    yarn add -D @figma/plugin-typings
  2. Configure tsconfig.json

    {
        "compilerOptions": {
            "typeRoots": [
                "./node_modules/@types",
                "./node_modules/@figma"
            ]
        }
    }

    The configuration above is needed for the TypeScript compiler to use type definitions found in both ./node_modules/@types and ./node_modules/@figma. Normally, most external type definitions are from DefinitelyTyped and are installed in /@types, which included by TypeScript by default. Since we host the plugin typings separately, they are installed outside in /@figma instead.

    Types should become globally available without needing to use import statements. We do it this way because the plugin API is part of the host environment, as opposed to being a package that a plugin includes.

About

Plugin API releases have the format "Version X, Update Y". Equivalent tags are created in this repository as v<x>.<y>. Note that not all API releases include API changes, some are just bug fixes. Therefore, some typings versions are skipped.

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i @figma/plugin-typings

    Weekly Downloads

    52,347

    Version

    1.91.0

    License

    MIT License

    Unpacked Size

    78.5 kB

    Total Files

    9

    Last publish

    Collaborators

    • griffinchoe
    • dmartin-figma
    • ptomas
    • bsiejka
    • lingrace
    • jmacapagal
    • jefflee-figma
    • ahurtado-figma
    • jgao54
    • rstebbingfigma
    • mharris-figma
    • elainefigma
    • efrankenberg
    • bdrebing
    • iturner
    • akrimont
    • reid-figma
    • cjxh
    • james04321
    • alvin-a
    • jennylea
    • sueh
    • johndoherty13
    • trev4ev
    • rchouhan
    • sicking
    • jfirebaugh
    • ymichael
    • matthewhuang
    • lighthurst
    • breecabiles
    • renisabel
    • naomijung
    • johnklai
    • linzhiq
    • kfung
    • delongfu