TypeScript LSP
TypeScript/JavaScript language server integration providing comprehensive code intelligence through typescript-language-server.
Capabilities
- Type checking: Static analysis of TypeScript and JavaScript types
- Code intelligence: Autocomplete, go-to-definition, find references, rename symbols
- Error detection: Real-time diagnostics for type errors, syntax issues, and semantic problems
- Refactoring: Extract function/variable, organize imports, quick fixes
- Supported extensions:
.ts, .tsx, .js, .jsx, .mts, .cts, .mjs, .cjs
Installation
Install TypeScript language server and TypeScript compiler:
npm install -g typescript-language-server typescript
Or with yarn:
yarn global add typescript-language-server typescript
Verify installation:
typescript-language-server --version
tsc --version
Usage
The language server runs automatically in LSP-compatible editors. For manual type checking:
tsc --noEmit # Type check without generating output files
Compile TypeScript files:
tsc src/index.ts
Watch mode for continuous type checking:
tsc --watch --noEmit
Configuration
Create tsconfig.json in project root:
{
"compilerOptions": {
"target": "ES2020",
"module": "ESNext",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"moduleResolution": "node"
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}
Integration Pattern
When editing TypeScript/JavaScript code:
- Run
tsc --noEmit after significant changes
- Address type errors before committing
- Use
tsc --watch during active development
- Leverage quick fixes for common issues
Common Flags
--noEmit: Type check only, no output files
--strict: Enable all strict type checking options
--watch: Watch mode for continuous compilation
--project <path>: Specify tsconfig.json location
--pretty: Stylize errors and messages
More Information
Source: Pouryaak/LokulMem — distributed by TomeVault.
1---2name: typescript-lsp-23description: TypeScript language server providing type checking, code intelligence, and LSP diagnostics for .ts, .tsx, .js, .jsx, .mts, .cts, .mjs, .cjs files. Use when working with TypeScript or JavaScript code that needs type checking, autocomplete, error detection, refactoring support, or code navigation. Use when this capability is needed.4---56# TypeScript LSP78TypeScript/JavaScript language server integration providing comprehensive code intelligence through typescript-language-server.910## Capabilities1112- **Type checking**: Static analysis of TypeScript and JavaScript types13- **Code intelligence**: Autocomplete, go-to-definition, find references, rename symbols14- **Error detection**: Real-time diagnostics for type errors, syntax issues, and semantic problems15- **Refactoring**: Extract function/variable, organize imports, quick fixes16- **Supported extensions**: `.ts`, `.tsx`, `.js`, `.jsx`, `.mts`, `.cts`, `.mjs`, `.cjs`1718## Installation1920Install TypeScript language server and TypeScript compiler:2122```bash23npm install -g typescript-language-server typescript24```2526Or with yarn:27```bash28yarn global add typescript-language-server typescript29```3031Verify installation:32```bash33typescript-language-server --version34tsc --version35```3637## Usage3839The language server runs automatically in LSP-compatible editors. For manual type checking:4041```bash42tsc --noEmit # Type check without generating output files43```4445Compile TypeScript files:4647```bash48tsc src/index.ts49```5051Watch mode for continuous type checking:5253```bash54tsc --watch --noEmit55```5657## Configuration5859Create `tsconfig.json` in project root:6061```json62{63 "compilerOptions": {64 "target": "ES2020",65 "module": "ESNext",66 "strict": true,67 "esModuleInterop": true,68 "skipLibCheck": true,69 "forceConsistentCasingInFileNames": true,70 "resolveJsonModule": true,71 "moduleResolution": "node"72 },73 "include": ["src/**/*"],74 "exclude": ["node_modules", "dist"]75}76```7778## Integration Pattern7980When editing TypeScript/JavaScript code:811. Run `tsc --noEmit` after significant changes822. Address type errors before committing833. Use `tsc --watch` during active development844. Leverage quick fixes for common issues8586## Common Flags8788- `--noEmit`: Type check only, no output files89- `--strict`: Enable all strict type checking options90- `--watch`: Watch mode for continuous compilation91- `--project <path>`: Specify tsconfig.json location92- `--pretty`: Stylize errors and messages9394## More Information9596- [typescript-language-server on npm](https://www.npmjs.com/package/typescript-language-server)97- [GitHub Repository](https://github.com/typescript-language-server/typescript-language-server)98- [TypeScript Official Documentation](https://www.typescriptlang.org/docs/)99- [TypeScript Compiler Options](https://www.typescriptlang.org/tsconfig)100101---102> Source: [Pouryaak/LokulMem](https://github.com/Pouryaak/LokulMem) — distributed by [TomeVault](https://tomevault.io).103<!-- tomevault:4.0:skill_md:2026-05-20 -->