Skip to content

Releases: AndrewJakubowicz/ts-depDraw

Bare minimum release

20 Dec 03:59
Compare
Choose a tag to compare
Bare minimum release Pre-release
Pre-release

Public Api

Server can be npm installed globally, and then started by running:

Currently it must be initiated from a directory containing tsconfig.json

ts-depDraw <filePath>

It'll then start a server at port 8080 which you can query using the following public api's.

/api/init

  • returns the root file for the project. (the filepath that you initialised the server with)

/api/getFileText

  • params: [filePath {string} a relative filePath from your servers working directory]
  • returns plain text of the file.

/api/getTextIdentifierTokensLocations

  • params: [filePath {string} a relative filePath from your servers working directory]
  • returns token data. Can be used to recreate the display.

/api/getTokenType?filePath='filePath'&line='lineNumber'&offset='offsetNumber'

  • returns data for the type of token requested.

/api/getTokenDependencies?filePath='filePath'&line='lineNumber'&offset='offsetNumber'

  • returns the dependencies.

/api/getTokenDependents?filePath='filePath'&line='lineNumber'&offset='offsetNumber'

  • returns the dependents.