adobexd-types
TypeScript icon, indicating that this package has built-in type declarations

49.0.0 • Public • Published

Adobe XD Plugin API typings

Typings for Adobe XD and (UXP)[https://www.adobe.io/xd/uxp/uxp/] Plugin Development

typings-supported autocompletion features in JetBrains WebStorm

Getting started

These Type Declaration files provide your IDE (e.g. Visual Studio Code or WebStorm) with information about the XD API surface, enabling type checking, autocomplete suggestions, and more.

To get started

  • install the package via npm:
    npm i adobexd-types`
    
  • add the typings file to "typeRoots" your jsconfig.json or tsconfig.json:
    {
      "compilerOptions": {
        "typeRoots": ["node_modules/adobexd-types"]
      },
    }
  • (optional) add the UXP WebComponents to the JSX.IntrinsicElements namespace by adding a reference to a types.d.ts file
    /// <reference path="./node_modules/adobexd-types/uxp/jsxWebComponents.d.ts" /> 

About these type files

These type declarations track the contents of the official documentation. If an issue with the type declarations stems from an issue with the official documentation, then the type declaration files will be fixed once the issue is addressed in the documentation. This is intentional so as to keep the type declarations both maintainable and in sync with the documentation.

A few notable exceptions include:

  • The application.import() function cannot be declared because import is a reserved TypeScript keyword (not sure if this can be fixed). It is declared as application.importFiles() instead.
  • To avoid ambiguity with the DOM Selection type, the interface Selection is also provided as an alias XDSelection and exported from the 'scenegraph' module

Original Documentation Links

Package Sidebar

Install

npm i adobexd-types

Weekly Downloads

8

Version

49.0.0

License

MIT

Unpacked Size

166 kB

Total Files

47

Last publish

Collaborators

  • arniebradfo