-
Notifications
You must be signed in to change notification settings - Fork 6
/
env.d.ts
44 lines (41 loc) · 1.22 KB
/
env.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import type { ExtensionContext, Webview } from 'vscode';
// Make this a module
export {};
declare global {
/**
* fix code hint
*/
type UnionType<T> = T | (string & {});
namespace NodeJS {
interface ProcessEnv {
/**
* Node.js environment
*/
NODE_ENV: UnionType<'development' | 'production'>;
/**
* `[vite serve]` The url of the vite dev server.
*/
VITE_DEV_SERVER_URL?: string;
/**
* `[vite build]` All js files in the dist directory, excluding index.js. It's to be a json string.
*/
VITE_WEBVIEW_DIST?: string;
}
}
/**
* `[vite serve]` Gets the html of webview in development mode.
* @param options serverUrl: The url of the vite dev server.
*/
function __getWebviewHtml__(options?: string | { serverUrl: string }): string;
/**
* `[vite build]` Gets the html of webview in production mode.
* @param webview The Webview instance of the extension.
* @param context The ExtensionContext instance of the extension.
* @param inputName vite build.rollupOptions.input name. Default is `index`.
*/
function __getWebviewHtml__(
webview: Webview,
context: ExtensionContext,
inputName?: string,
): string;
}