jxa-common-used
Version:
d.ts for common used app
66 lines (45 loc) • 1.27 kB
Markdown
> d.ts for common used app
[](https://www.npmjs.com/package/jxa-common-used)
[](https://www.npmjs.com/package/jxa-common-used)
[](http://magicdawn.mit-license.org)
```sh
$ pnpm add jxa-common-used
```
```sh
pnpm add -D @jxa/types @jxa/global-type jxa-common-used
```
tsconfig.json
```json
{
"compilerOptions": {
"types": ["@jxa/global-type", "@jxa/types"]
}
}
```
or use triple slash directive
```ts
/// <reference types='@jxa/global-type' />
/// <reference types='@jxa/types' />
```
in some-script.ts
```ts
/// <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.md)
the MIT License http://magicdawn.mit-license.org