Skip to content

Commit

Permalink
Fix Port Attributes constructor (#184412)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexr00 committed Jun 6, 2023
1 parent a8e719e commit aee5255
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
10 changes: 2 additions & 8 deletions src/vs/workbench/api/common/extHostTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3852,14 +3852,8 @@ export class LinkedEditingRanges {
export class PortAttributes {
private _autoForwardAction: PortAutoForwardAction;

constructor(autoForwardAction: PortAutoForwardAction);
constructor(port: number, autoForwardAction: PortAutoForwardAction);
constructor(portOrAction: number | PortAutoForwardAction, autoForwardAction?: PortAutoForwardAction) {
if (typeof portOrAction === 'number') {
this._autoForwardAction = autoForwardAction!;
} else {
this._autoForwardAction = portOrAction;
}
constructor(autoForwardAction: PortAutoForwardAction) {
this._autoForwardAction = autoForwardAction;
}

get autoForwardAction(): PortAutoForwardAction {
Expand Down
4 changes: 0 additions & 4 deletions src/vscode-dts/vscode.proposed.portsAttributes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ declare module 'vscode' {
*/
autoForwardAction: PortAutoForwardAction;

/**
* @deprecated
*/
constructor(port: number, autoForwardAction: PortAutoForwardAction);
/**
* Creates a new PortAttributes object
* @param port the port number
Expand Down

0 comments on commit aee5255

Please sign in to comment.