Elyra
Elyra The coding agent Elyra Conductor Local project conductor Elyra SQL Anywhere Replication-ready SQL engine
Development
Development
Elyra
LSP TypeScript

LSP TypeScript

Semantic code navigation for TypeScript projects — go-to-definition, find-references, diagnostics, and hover.

@elyracode/lsp-typescript starts a typescript-language-server process per session and exposes the Language Server Protocol as agent tools. This gives the model the same semantic understanding your IDE has — exact symbol locations, type information, and real compiler diagnostics — instead of relying on text search and guesswork.

Install

elyra install npm:@elyracode/lsp-typescript

The project must have both packages installed locally or globally:

npm install -D typescript typescript-language-server

The extension looks for typescript-language-server in the project's node_modules/.bin/ first, then falls back to a global installation. A tsconfig.json must exist in the project root — the extension does nothing if one is not found.

Tools

Tool Description
lsp_definitions Go to the definition of a symbol at a given file position
lsp_references Find all references to a symbol across the project
lsp_diagnostics Get TypeScript errors and warnings for a file
lsp_hover Get type information and documentation for a symbol

All tools accept 1-based line and column numbers and return human-readable text results.

Examples

> Where is `parseConfig` defined?
> Find every call site of `applyTheme` in this repo
> What TypeScript errors does src/agent/runner.ts have?
> What is the inferred type of the `session` variable on line 42 of session.ts?

Why use it

  • Accuracy — definitions and references come from the TypeScript compiler, not regex
  • Refactors that don't miss call siteslsp_references enumerates every usage before edits
  • Real diagnostics — surface the same errors tsc would, without running a full build
  • Hover types — inspect inferred types and JSDoc without opening the file in an editor