TypeScript Tools CLI Server
typescript-tools provides a command-line server, `tss`, which exposes an API to the TypeScript Language Services. Its primary purpose was to enable editor plugins (e.g., for Vim, Emacs, Sublime Text) to integrate early TypeScript features such as type information lookup, symbol definition navigation, and code completion. The package was designed for TypeScript Language Services v0.9, which is severely outdated as TypeScript is now in its 5.x major release series. Development of `typescript-tools` appears to have ceased around 2014-2015, making it an abandoned project. It is not compatible with modern TypeScript versions and lacks active maintenance or a defined release cadence.
Common errors
-
Error: Cannot find module 'typescript' or 'tss.js' not found
cause The `typescript-tools` package depends on a specific, and very old, internal structure and version of TypeScript (0.9). Modern npm installations or TypeScript versions will not satisfy these outdated requirements.fixThis package cannot be easily made to work with modern TypeScript installations. The recommended fix is to use alternative, actively maintained tools or built-in editor support. -
tss: command not found
cause The `tss` command was not installed globally or is not in your system's PATH. This can happen if `npm install -g` failed silently or if Node.js/npm's global binary directory isn't correctly configured in your environment.fixEnsure `npm install -g typescript-tools` completes successfully. Verify npm's global bin path is included in your system's PATH variable (e.g., `echo $PATH` on Linux/macOS or `Get-Command tss` in PowerShell to check if it's found).
Warnings
- breaking This package is explicitly built against TypeScript Language Services v0.9 and is fundamentally incompatible with modern TypeScript versions (1.0+). Attempting to use it with current projects will result in incorrect or non-functional behavior due to API changes.
- gotcha The project is abandoned, with the last commits dating back to 2014-2015. There is no active maintenance, bug fixes, or security patches, making it unsuitable for use in any contemporary development or production environment.
- deprecated The command-line server approach for editor integration has largely been superseded by the Language Server Protocol (LSP), which provides a standardized and robust way for editors and IDEs to communicate with language-specific servers.
Install
-
npm install typescript-tools -
yarn add typescript-tools -
pnpm add typescript-tools
Imports
- tss (command-line)
import { tss } from 'typescript-tools'n/a
Quickstart
npm install -g typescript-tools
# Example TypeScript file (e.g., tests/test.ts):
# declare const x: { a: number; b: number; };
# const y = x.a;
# Start the server and query for type information via standard input
# Note: Output and paths will vary significantly due to the package's age
# and incompatibility with modern TypeScript.
# This command block simulates input for the tss server.
# The 'tss' executable might require its full path on some systems.
# Example session (pipe commands to tss):
tss tests/test.ts <<EOF
type 4 2 tests/test.ts
definition 4 2 tests/test.ts
completions true 4 4 tests/test.ts
quit
EOF