Closed JMichaelTX closed 5 years ago
Thanks for feedback.
@jxa/global-type's approach is same with Cypress that is a E2E framework.
There are serveral pattern of usage.
If you write JXA script as TypeScript project, you just import @jxa/global-type
file.ts:
import("@jxa/global-type");
If you write JXA as JavaScript, you should do following steps:
package.json
$ npm init --yes
@jxa/global-type
$ npm install -D @jxa/global-type
tsconfig.json
file with the following configuration should get intelligent code completion working.tsconfig.json:
{
"compilerOptions": {
"allowJs": true,
"types": [
"@jxa/global-type"
]
},
"include": [
"**/*.js" // <= this scope is integrated with @jxa/global-type
]
}
file.js
Also, I've created starter repository for JavaScript user.
git clone https://github.com/JXA-userland/editor-integrate-example
cd editor-integrate-example
vscode .
Thanks again for all the information you have provided.
I've tried many things but still can not get autocomplete of my JXA code to work.
Would it be possible to do a screen share some time, where you could walk me through this process?
If you would do that, then I would be happy to create a YouTube video showing users like me how to get this done.
First, thanks for building and sharing a terrific tool! ๐ I can't wait to start using it.
However, I need help. Can you please provide detailed, step-by-step, instructions on how to install your JXA autocomplete into Visual Studio Code?
Thanks.