Socket
Socket
Sign inDemoInstall

@figma/widget-typings

Package Overview
Dependencies
Maintainers
45
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@figma/widget-typings

Typings for the Figma Widget API


Version published
Maintainers
45
Created
Source

Figma Widget API typings

npm

This repository contains the typings for the Figma Widget API.

Usage

  1. Installation

    Note that the widget api is an extention of the plugin api so you should install both @figma/plugin-typings and @figma/widget-typings

    npm i --save-dev @figma/plugin-typings @figma/widget-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 & widget 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 widget API is part of the host environment, as opposed to being a package that a plugin includes.

About

Widget 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.

Keywords

FAQs

Package last updated on 16 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc