Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port attributes API updates #185848

Merged
merged 1 commit into from
Jun 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/vscode-dts/vscode.proposed.portsAttributes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ declare module 'vscode' {
*/
Notify = 1,
/**
* Once the port is forwarded, open the browser to the forwarded port.
* Once the port is forwarded, open the user's web browser to the forwarded port.
*/
OpenBrowser = 2,
/**
Expand All @@ -30,11 +30,7 @@ declare module 'vscode' {
/**
* Do not forward the port.
*/
Ignore = 5,
/**
* Once the port is forwarded, open the browser to the forwarded port. Only open the browser the first time the port is forwarded in a session.
*/
OpenBrowserOnce = 6
Ignore = 5
}

/**
Expand Down Expand Up @@ -62,6 +58,10 @@ declare module 'vscode' {
* Provides attributes for the given port. For ports that your extension doesn't know about, simply
* return undefined. For example, if `providePortAttributes` is called with ports 3000 but your
* extension doesn't know anything about 3000 you should return undefined.
* @param port The port number of the port that attributes are being requested for.
* @param pid The pid of the process that is listening on the port. If the pid is unknown, undefined will be passed.
* @param commandLine The command line of the process that is listening on the port. If the command line is unknown, undefined will be passed.
* @param token A cancellation token that indicates the result is no longer needed.
*/
providePortAttributes(port: number, pid: number | undefined, commandLine: string | undefined, token: CancellationToken): ProviderResult<PortAttributes>;
}
Expand Down