1 | /**
|
2 | * Adapted from https://github.com/microsoft/TypeScript/issues/29729
|
3 | * Since `string | 'foo'` doesn't offer auto completion
|
4 | */
|
5 | declare type StringLiteralUnion<T extends U, U = string> = T | (U & {});
|
6 | export declare type DownloadVersion = StringLiteralUnion<'insiders' | 'stable'>;
|
7 | export declare type DownloadPlatform = StringLiteralUnion<'darwin' | 'win32-archive' | 'win32-x64-archive' | 'linux-x64'>;
|
8 | export interface DownloadOptions {
|
9 | readonly cachePath: string;
|
10 | readonly version: DownloadVersion;
|
11 | readonly platform: DownloadPlatform;
|
12 | }
|
13 | /**
|
14 | * Download and unzip a copy of VS Code.
|
15 | * @returns Promise of `vscodeExecutablePath`.
|
16 | */
|
17 | export declare function download(options?: Partial<DownloadOptions>): Promise<string>;
|
18 | /**
|
19 | * Download and unzip a copy of VS Code in `.vscode-test`. The paths are:
|
20 | * - `.vscode-test/vscode-<PLATFORM>-<VERSION>`. For example, `./vscode-test/vscode-win32-1.32.0`
|
21 | * - `.vscode-test/vscode-win32-insiders`.
|
22 | *
|
23 | * *If a local copy exists at `.vscode-test/vscode-<PLATFORM>-<VERSION>`, skip download.*
|
24 | *
|
25 | * @param version The version of VS Code to download such as `1.32.0`. You can also use
|
26 | * `'stable'` for downloading latest stable release.
|
27 | * `'insiders'` for downloading latest Insiders.
|
28 | * When unspecified, download latest stable version.
|
29 | *
|
30 | * @returns Promise of `vscodeExecutablePath`.
|
31 | */
|
32 | export declare function downloadAndUnzipVSCode(version?: DownloadVersion, platform?: DownloadPlatform): Promise<string>;
|
33 | export {};
|