0.0.3 • Published 3 years ago
jxa-common-used v0.0.3
jxa-common-used
d.ts for common used app
Install
$ pnpm add jxa-common-usedUsage
pnpm add -D @jxa/types @jxa/global-type jxa-common-usedtsconfig.json
{
  "compilerOptions": {
    "types": ["@jxa/global-type", "@jxa/types"]
  }
}or use triple slash directive
/// <reference types='@jxa/global-type' />
/// <reference types='@jxa/types' />in some-script.ts
#!txa
/// <reference types='@jxa/global-type' />
/// <reference types='@jxa/types' />
import { PathFinder } from '..'
{
  const app = Application<PathFinder>('Path Finder')
  console.log((app.selection() || []).map((x) => x.posixPath()))
}
{
  const app = Application('Finder')
  console.log((app.selection() || []).map((x) => x.url()))
}Changelog
License
the MIT License http://magicdawn.mit-license.org