-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathenv.d.ts
54 lines (51 loc) · 1.33 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
45
46
47
48
49
50
51
52
53
54
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;
}
}
interface WebviewHtmlOptions {
/**
* `[vite serve]` The url of the vite dev server. Please use `process.env.VITE_DEV_SERVER_URL`
*/
serverUrl?: string;
/**
* `[vite build]` The Webview instance of the extension.
*/
webview: Webview;
/**
* `[vite build]` The ExtensionContext instance of the extension.
*/
context: ExtensionContext;
/**
* `[vite build]` vite build.rollupOptions.input name. Default is `index`.
*/
inputName?: string;
/**
* `[vite build]` Inject code into the afterbegin of the head element.
*/
injectCode?: string;
}
/**
* Gets the html of webview
*/
function __getWebviewHtml__(options?: WebviewHtmlOptions): string;
}