# create new folder
mkdir my-script
cd my-script
# install types-for-adobe
npm init -y
npm i types-for-adobe
# create tsconfig.json
printf '{"compilerOptions":{"module":"none","noLib":true}}' > tsconfig.json
# create index.ts and change reference types to Adobe product you're targeting
printf '/// <reference types="types-for-adobe/Illustrator/2015.3"/>\nalert(String(app));\n' > index.ts
# compile typescript files
tsc
# open Adobe Illustrator -> File -> Scripts -> Other Script -> and open index.js
Everything in this project was generated through one of the following methods:
This repo aims to maintain a history of typedefs for each given version of each hostapp.
This way, if you're developing a tool aimed at, say, Adobe After Effects v18.0, you can have your tool specifically use those typedefs, and know that you're not using features that were introduced in a later version.
For public, commercial tools: with some hostapps, it's generally accepted that the app's user base will be spread out among multiple versions of the software. Targeting a slightly older version ensures wider adoption than focusing solely on the latest version.
For internal, proprietary tools: some companies mandate that all artists use a specific (older) version; having separate definitions for that version allows for this specific targeting.
This really depends on your needs; if you're hoping to release a commercial tool and assume that all users are using a specific version or newer, use that! If you need to leverage a feature added at a specific point, use those typedefs instead & let your users know this is the minimum supported version.
Two possible answers! Either
Thanks to all of our contributors for helping make this project succeed!
Have something to add? Please open a PR!