chore: env 翻译完成

youngjuning-patch-1
youngjuning 2 years ago
parent 26843f01f3
commit 6942c4b89f

142
vscode.d.ts vendored

@ -8177,42 +8177,66 @@ declare module vscode {
Web = 2 Web = 2
} }
/**
* Namespace describing the environment the editor runs in.
*/
/** /**
* *
* @maintainer {@link https://github.com/Saber2pr @Saber2pr} *
* @maintainer {@link https://github.com/youngjuning @youngjuning}
*/ */
export namespace env { export namespace env {
/**
/** * The application name of the editor, like 'VS Code'.
* The application name of the editor, like 'VS Code'. */
*/ /**
* 'VS Code'
*/
export const appName: string; export const appName: string;
/** /**
* The application root folder from which the editor is running. * The application root folder from which the editor is running.
* *
* *Note* that the value is the empty string when running in an * *Note* that the value is the empty string when running in an
* environment that has no representation of an application root folder. * environment that has no representation of an application root folder.
*/
/**
*
*
* **
*/ */
export const appRoot: string; export const appRoot: string;
/**
* The custom uri scheme the editor registers to in the operating system.
*/
/** /**
* The custom uri scheme the editor registers to in the operating system. * URI
*
*/ */
export const uriScheme: string; export const uriScheme: string;
/**
* Represents the preferred user-language, like `de-CH`, `fr`, or `en-US`.
*/
/** /**
* Represents the preferred user-language, like `de-CH`, `fr`, or `en-US`. * `de-CH``fr` `en-US`
*
*/ */
export const language: string; export const language: string;
/** /**
* The system clipboard. * The system clipboard.
*/ */
/**
*
*/
export const clipboard: Clipboard; export const clipboard: Clipboard;
/**
* A unique identifier for the computer.
*/
/** /**
* A unique identifier for the computer. *
*/ */
export const machineId: string; export const machineId: string;
@ -8220,24 +8244,44 @@ declare module vscode {
* A unique identifier for the current session. * A unique identifier for the current session.
* Changes each time the editor is started. * Changes each time the editor is started.
*/ */
/**
*
*
*
*/
export const sessionId: string; export const sessionId: string;
/** /**
* Indicates that this is a fresh install of the application. * Indicates that this is a fresh install of the application.
* `true` if within the first day of installation otherwise `false`. * `true` if within the first day of installation otherwise `false`.
*/ */
/**
*
*
* `true` `false`
*/
export const isNewAppInstall: boolean; export const isNewAppInstall: boolean;
/** /**
* Indicates whether the users has telemetry enabled. * Indicates whether the users has telemetry enabled.
* Can be observed to determine if the extension should send telemetry. * Can be observed to determine if the extension should send telemetry.
*/ */
/**
*
*
*
*/
export const isTelemetryEnabled: boolean; export const isTelemetryEnabled: boolean;
/** /**
* An {@link Event} which fires when the user enabled or disables telemetry. * An {@link Event} which fires when the user enabled or disables telemetry.
* `true` if the user has enabled telemetry or `false` if the user has disabled telemetry. * `true` if the user has enabled telemetry or `false` if the user has disabled telemetry.
*/ */
/**
* {@link Event}
*
* `true` `false`
*/
export const onDidChangeTelemetryEnabled: Event<boolean>; export const onDidChangeTelemetryEnabled: Event<boolean>;
/** /**
@ -8249,6 +8293,12 @@ declare module vscode {
* exists. Use {@link Extension.extensionKind} to know if * exists. Use {@link Extension.extensionKind} to know if
* a specific extension runs remote or not. * a specific extension runs remote or not.
*/ */
/**
* `wsl` Windows Linux `ssh-remote` 使 shell
*
* ** `undefined`
* 使 {@link Extension.extensionKind}
*/
export const remoteName: string | undefined; export const remoteName: string | undefined;
/** /**
@ -8256,6 +8306,10 @@ declare module vscode {
* `terminal.integrated.shell` setting for the extension host's platform. Note that in * `terminal.integrated.shell` setting for the extension host's platform. Note that in
* environments that do not support a shell the value is the empty string. * environments that do not support a shell the value is the empty string.
*/ */
/**
* shell `terminal.integrated.shell`
* shell
*/
export const shell: string; export const shell: string;
/** /**
@ -8263,6 +8317,9 @@ declare module vscode {
* are accessed from. For example, extensions could be accessed * are accessed from. For example, extensions could be accessed
* from a desktop application or a web browser. * from a desktop application or a web browser.
*/ */
/**
* UI kind UI 访 Web 访
*/
export const uiKind: UIKind; export const uiKind: UIKind;
/** /**
@ -8278,6 +8335,17 @@ declare module vscode {
* @param target The uri that should be opened. * @param target The uri that should be opened.
* @returns A promise indicating if open was successful. * @returns A promise indicating if open was successful.
*/ */
/**
* 使使
* * `http:``https:`
* * `mailto:`
* * VSCode `vscode:` `vscode.env.uriScheme`
*
* ** {@linkcode window.showTextDocument showTextDocument}
*
* @param target uri
* @returns promise
*/
export function openExternal(target: Uri): Thenable<boolean>; export function openExternal(target: Uri): Thenable<boolean>;
/** /**
@ -8333,6 +8401,50 @@ declare module vscode {
* *
* @return A uri that can be used on the client machine. * @return A uri that can be used on the client machine.
*/ */
/**
* uri 访
*
* #### `http:` `https:`
*
* *external* uri `http:` `https:` uri
*
*
*
* `target` uri
*
* ** `openExternal` uris `asExternalUri`
*
* #### `vscode.env.uriScheme`
*
* uri `openExternal` {@link UriHandler}
*
* uri 使 uri uri
*
* ** uri {@link UriHandler} uri
*
* ****
*
* ```typescript
* vscode.window.registerUriHandler({
* handleUri(uri: vscode.Uri): vscode.ProviderResult<void> {
* if (uri.path === '/did-authenticate') {
* console.log(uri.toString());
* }
* }
* });
*
* const callableUri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://my.extension/did-authenticate`));
* await vscode.env.openExternal(callableUri);
* ```
*
* ** `asExternalUri` uri `asExternalUri`
*
* ####
*
* URI URI URI使
*
* @return 使 uri
*/
export function asExternalUri(target: Uri): Thenable<Uri>; export function asExternalUri(target: Uri): Thenable<Uri>;
} }

Loading…
Cancel
Save