web API 💄
This commit is contained in:
parent
2e23a7c3ad
commit
ac22bcaa06
1 changed files with 29 additions and 3 deletions
|
@ -82,7 +82,7 @@ interface ITunnelOptions {
|
||||||
protocol?: string;
|
protocol?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TunnelCreationOptions {
|
interface TunnelCreationOptions {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* True when the local operating system will require elevation to use the requested local port.
|
* True when the local operating system will require elevation to use the requested local port.
|
||||||
|
@ -210,10 +210,12 @@ interface IPosition {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IRange {
|
interface IRange {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The start position. It is before or equal to end position.
|
* The start position. It is before or equal to end position.
|
||||||
*/
|
*/
|
||||||
readonly start: IPosition;
|
readonly start: IPosition;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The end position. It is after or equal to start position.
|
* The end position. It is after or equal to start position.
|
||||||
*/
|
*/
|
||||||
|
@ -230,7 +232,11 @@ interface IDefaultEditor {
|
||||||
interface IDefaultLayout {
|
interface IDefaultLayout {
|
||||||
readonly views?: IDefaultView[];
|
readonly views?: IDefaultView[];
|
||||||
readonly editors?: IDefaultEditor[];
|
readonly editors?: IDefaultEditor[];
|
||||||
/** Forces this layout to be applied even if this isn't the first time the workspace has been opened */
|
|
||||||
|
/**
|
||||||
|
* Forces this layout to be applied even if this isn't
|
||||||
|
* the first time the workspace has been opened
|
||||||
|
*/
|
||||||
readonly force?: boolean;
|
readonly force?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -500,6 +506,7 @@ interface IPerformanceMark {
|
||||||
interface IWorkbench {
|
interface IWorkbench {
|
||||||
|
|
||||||
commands: {
|
commands: {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see [executeCommand](#commands.executeCommand)
|
* @see [executeCommand](#commands.executeCommand)
|
||||||
*/
|
*/
|
||||||
|
@ -507,12 +514,21 @@ interface IWorkbench {
|
||||||
}
|
}
|
||||||
|
|
||||||
env: {
|
env: {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see [getUriScheme](#env.getUriScheme)
|
||||||
|
*/
|
||||||
readonly uriScheme: string;
|
readonly uriScheme: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see [retrievePerformanceMarks](#commands.retrievePerformanceMarks)
|
* @see [retrievePerformanceMarks](#commands.retrievePerformanceMarks)
|
||||||
*/
|
*/
|
||||||
retrievePerformanceMarks(): Promise<[string, readonly IPerformanceMark[]][]>;
|
retrievePerformanceMarks(): Promise<[string, readonly IPerformanceMark[]][]>;
|
||||||
openUri(uri: URI): Promise<boolean>;
|
|
||||||
|
/**
|
||||||
|
* @see [openUri](#env.openUri)
|
||||||
|
*/
|
||||||
|
openUri(target: URI): Promise<boolean>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -613,13 +629,23 @@ namespace env {
|
||||||
return workbench.env.retrievePerformanceMarks();
|
return workbench.env.retrievePerformanceMarks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns the scheme to use for opening the associated desktop
|
||||||
|
* experience via protocol handler.
|
||||||
|
*/
|
||||||
export async function getUriScheme(): Promise<string> {
|
export async function getUriScheme(): Promise<string> {
|
||||||
const workbench = await workbenchPromise;
|
const workbench = await workbenchPromise;
|
||||||
|
|
||||||
return workbench.env.uriScheme;
|
return workbench.env.uriScheme;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allows to open a `URI` with the standard opener service of the
|
||||||
|
* workbench.
|
||||||
|
*/
|
||||||
export async function openUri(target: URI): Promise<boolean> {
|
export async function openUri(target: URI): Promise<boolean> {
|
||||||
const workbench = await workbenchPromise;
|
const workbench = await workbenchPromise;
|
||||||
|
|
||||||
return workbench.env.openUri(target);
|
return workbench.env.openUri(target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue