Git Product home page Git Product logo

photoshop.d.ts's Introduction

Photoshop.d.ts

npm version Build Status dependencies status

Type-safe Photoshop scripting

Getting Started

npm install photoshop.d.ts

Add a reference to your target version, e.g.:

///<reference path="./node_modules/photoshop.d.ts/dist/cc/ps.d.ts"/>

The other references will automatically resolve.

Usage

///<reference path="./ps.d.ts"/>

var document = app.activeDocument; // Access global `app`
var layers   = document.artLayers; // OK
var bogus    = document.bogus;     // Type Error

Building

The typescript declarations are generated from the official javascript reference PDFs. The text is copied and pasted into local files. The parser will parse the raw text file and extract meaningful information from the respective chapters of the documentation. Once the parser has delivered a in-memory representation of the types and constants, the emitter will render types and constants as typescript files.

$ npm install && npm test

What's new?

v0.3.0

  • Add typings for Adobe Photoshop CC
  • Remove sample scripts from docs
  • Sanitize docs

Caveats

The project is up to a point where the parsers do a pretty good job, although some manual fix ups need to be made to the raw text documents before parsing (remove typos, inconsistent array notations etc) that would be awkward and long-winded to write parsers for. The full list of these is currently to be found in parsers/types.ts. Since the source docs rarely change, they are committed to this project and maintained here.

photoshop.d.ts's People

Contributors

felixschl avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.