Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 706 Bytes

File metadata and controls

22 lines (16 loc) · 706 Bytes

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.