Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TypeScript-enabled Sample Environment and First-Pass Type Declarations #57

Merged
merged 9 commits into from
Jun 27, 2017

Conversation

ericdrobinson
Copy link
Contributor

This PR includes the following content:

  • TypeScript type declarations for ExtendScript Core and ExtendScript PremierePro APIs. These are currently incomplete (especially ExtendScript Core) and will need further work and improvements. The structure of the type declarations are a current "best-guess". Insight/guidance from Adobe engineers familiar with the internals would be much appreciated.
  • A customized version of the PProPanel project. The version included here splits the development environment into two contexts: ExtendScript (dom_app) and HTML (dom_html). Each contains its own tsconfig.json file, customized to provide context-specific type annotation support. This enables autocompletion, IntelliSense, and static analysis of JavaScript/ExtendScript when used in TypeScript enabled IDEs (e.g. Visual Studio Code). The project folder contains a -vscode suffix because it has been somewhat customized for the Visual Studio Code IDE. All such adjustments are contained within the .vscode folder.

Much work can be done to improve both of the above items but these should already prove helpful to users.

Initial commit of the ExtendScript and Premiere Pro type declaration files. They exist in the raw state that they were initially developed in. Much work is needed.
This is the PProPanel sample, adjusted to take advantage of TypeScript-based type declaration files to build an environment that enables modern tooling around Adobe CEP.
JavaScript syntax highlighting doesn't work in HTML in VSCode. This enables syntax highlighting for the scripts in question.
The "shared" folder is mostly interesting for TypeScript. This repository does not contain any actual TypeScript files yet - it merely has JavaScript and ExtendScript content. It _is_ setup for TypeScript, yes, but nothing makes use of this "feature". For now, leave it out to keep things as simple as possible.
The ExtendScript declaration files got a comment cleanup pass and a few more classes supported. The big win here is the inclusion of Object and ObjectConstructor which somewhat links it to the ECMAScript base.
The massive block of comments at the top was moved out into a ReadMe.md for easier viewing. What's more, the intermediary `PremiereObject1 class was re-implemented so as to provide full type support.
Declaration file authoring is somewhat of a black magic. Hopefully, these comments will help make some of the black magic a little more clear.
Add a ReadMe to the sample that provides some information as to the structure and content of the  "project".
The `with` statement was deprecated and should not be used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants