JXA icon indicating copy to clipboard operation
JXA copied to clipboard

Questions about @jxa/sdef-to-dts

Open JMichaelTX opened this issue 3 years ago • 1 comments

First, let me give you many, many thanks for providing this tool. I hope to use it to provide autocomplete in Visual Studio Code (VSC) for many of the third party apps (like Microsoft Outlook, Evernote, and Keyboard Maestro, and more) and many of the AppleScript Scripting Libraries (like Shane Stanley's "Myriad Tables Lib").

I have several questions:

Installation

My first question is about installation, using this command you provided: npm install @jxa/sdef-to-dts

Where do I install this? What folder do I need to be in so that it is available to all folders and workspaces of VSC?

Using @jxa/sdef-to-dts

You provide this command to convert .sdef and .app files $ npx @jxa/sdef-to-dts /Applications/Safari.app --output ./safari.d.ts

Two Questions:

  1. Where do I run this command so that the resulting dts files are fully integrated with other dts files, and so that all of these are available to all folders and workspaces of VSC?
  2. Does the name of the output dts file need to exactly match the input name?
    • For example, if the input file is "Microsoft Outlook.app", does the output file need to be "Microsoft Outlook.d.ts"?

Many thanks.

JMichaelTX avatar Jun 06 '21 22:06 JMichaelTX

@jxa/sdef-to-dts is just converter that generate from sdef to d.ts file.

Where do I run this command so that the resulting dts files are fully integrated with other dts files, and so that all of these are available to all folders and workspaces of VSC?

It may related to https://www.typescriptlang.org/tsconfig#types

Does the name of the output dts file need to exactly match the input name?

Probably, No.

https://www.typescriptlang.org/docs/handbook/declaration-files/templates/module-d-ts.html However, TypeSript's namespace disallow to include space.

azu avatar Jul 12 '21 12:07 azu