Volar TypeScript Language Service

0.0.70 · active · verified Sun Apr 19

This package, `volar-service-typescript`, integrates TypeScript language services into Volar, a powerful language tooling framework primarily developed for Vue and other web technologies. Currently at version 0.0.70, it functions as a critical plugin within the Volar ecosystem, providing essential features such as accurate type checking, intelligent code completion, robust refactoring capabilities, and comprehensive error diagnostics specifically tailored for TypeScript files within projects utilizing Volar. As an official component of the broader Volar project, its release cadence is closely tied to Volar's own development cycle, which typically involves continuous integration with frequent updates and patch releases, often aligning with the evolution of TypeScript itself. Its key differentiator is its role as the official and most deeply integrated method for leveraging TypeScript's full capabilities directly within Volar-powered development environments, ensuring seamless functionality and optimized performance compared to more generic language server integrations or alternative solutions.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to configure `volar-service-typescript` within your `volar.config.js` to enable TypeScript language features in your Volar project, alongside a basic `tsconfig.json`.

/* volar.config.js */
module.exports = {
	// Other Volar configurations...

	services: [
		// Integrate the TypeScript language service
		require('volar-service-typescript').create({
			// Optional: Custom TypeScript plugin options
			// E.g., disable default semantic diagnostics if handled externally
			// diagnosticSemantic: false,
		}),
	],
};

/* Example tsconfig.json (in your project root) */
{
  "compilerOptions": {
    "target": "ESNext",
    "module": "ESNext",
    "moduleResolution": "Bundler",
    "strict": true,
    "jsx": "preserve",
    "importHelpers": true,
    "lib": ["ESNext", "DOM", "DOM.Iterable"],
    "skipLibCheck": true,
    // ... other TS options
  },
  "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
}

view raw JSON →