-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathenv-webview.d.ts
More file actions
38 lines (35 loc) · 965 Bytes
/
env-webview.d.ts
File metadata and controls
38 lines (35 loc) · 965 Bytes
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
/**
* Inject some methods such as `getWebviewHtml`
*/
declare module 'virtual:vscode' {
import type { ExtensionContext, Webview } from 'vscode';
export 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;
}
/**
* Get the html of the webview.
*
* @param options
*/
export const getWebviewHtml: (options?: WebviewHtmlOptions) => string;
export default getWebviewHtml;
}