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

typescript-tshm-plugin

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-tshm-plugin

Augment TypeScript with tshm type signatures

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

typescript-tshm-plugin

Augment TypeScript with tshm type signatures.

The plugin is in its infancy, supporting only certain constructs such as variable and function declarations but nothing more fine-grained. It renders tshm's output alongside the normal type signature in "quick info".

screenshot

Usage

First and foremost, tshm must be installed and accessible to the plugin in your $PATH.

There are then two options for usage:

Global

If your editor supports it you can load the plugin within typescript-language-server (nota bene this is not plain tsserver which is what ships with VSCode for "Intellisense").

  1. Install the plugin globally with a package manager such as npm (npm i -g typescript-tshm-plugin).
  2. Configure the language server to load the plugin. Here's what that might look like with Neovim's native LSP client and nvim-lspconfig:
require'lspconfig'.tsserver.setup {
  init_options = {
    plugins = { {
      name = "typescript-tshm-plugin",
      location = "/usr/lib/node_modules/typescript-tshm-plugin/"
    } }
  }
}

Project

Alternatively you can set up the plugin on a per-project basis. This will work for the likes of VSCode.

  1. Install the plugin either globally or locally in your project with npm, Yarn, or similar.
  2. Add the following snippet to your project's tsconfig.json:
{
  "compilerOptions": {
    "plugins": [{ "name": "typescript-tshm-plugin" }]
  }
}

If your editor/language client is already running you'll need to reload it.

FAQs

Package last updated on 28 Jul 2021

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