Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vtsls/language-service

Package Overview
Dependencies
Maintainers
0
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vtsls/language-service

LSP wrapper for typescript extension of vscode

  • 0.2.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.8K
decreased by-19.06%
Maintainers
0
Weekly downloads
 
Created
Source

@vtsls/language-service

Usage example

import { createTSLanguageService } from "@vtsls/language-service";
const service = createTSLanguageService({
  clientCapabilities: {},
});

// initialize with configuration
await service.initialize({
  typescript: { tsserver: { log: "verbose" } },
});

const uri = "file:///path/to/file.ts";
// fill file content here
const fileContent = "";

// file needs to be opened before requesting features
service.openTextDocument({
  textDocument: {
    uri,
    languageId: "typescript",
    version: 0,
    text: fileContent,
  },
});

// see LSP document for the format of params and response
const response = await service.documentSymbol({ textDocument: { uri } })
console.log(response);

// close the service
service.dispose();

See @vtsls/language-server for more examples.

FAQs

Package last updated on 21 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc