get-vscode-typescript

v0.0.2
Get TypeScript Lib instance in VSCode extension environment. Rather than package the TypeScript and add 8mb more size.

get-vscode-typescript

Get TypeScript Lib instance in VSCode extension environment.
Rather than package the TypeScript and add 8mb more size.

Usage

import type * as ts from 'typescript';
import * as vscode from 'vscode';
import { getVSCodeTypeScriptInstance } from 'get-vscode-typescript';

export function activate(context: vscode.ExtensionContext) {
    const typescript = getVSCodeTypeScriptInstance(vscode.env.appRoot) as typeof ts;
    // do something with ts
}

Note

Copied from Volar and re-published as an OSS package.

Thanks all works from Johnson Chu.

npm i get-vscode-typescript

Metadata

  • MIT
  • Whatever
  • kingwl
  • released 3/28/2022

Downloads

Maintainers