-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,31 @@ | ||
/** | ||
* fix code hint | ||
*/ | ||
type UnionType<T> = T | (string & {}); | ||
export {}; // Make this a module | ||
|
||
declare namespace NodeJS { | ||
interface ProcessEnv { | ||
/** | ||
* Node.js environment | ||
*/ | ||
NODE_ENV: UnionType<'development' | 'production'>; | ||
/** | ||
* development mode. The url of the vite dev server. | ||
*/ | ||
VITE_DEV_SERVER_URL?: string; | ||
/** | ||
* production mode. All js files in the dist directory, excluding index.js. It's to be a json string. | ||
*/ | ||
VITE_DIST_FILES?: string; | ||
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_DIST_FILES?: string; | ||
} | ||
} | ||
|
||
/** | ||
* `[vite serve]` Get the html of the development webview. | ||
* @param options serverUrl: The url of the vite dev server. | ||
*/ | ||
function __getWebviewHtml__(options?: string | { serverUrl: string }): string; | ||
} |