Skip to content

Commit

Permalink
Updates to usage of PortAttributes VSC API (#13506)
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne committed May 16, 2023
1 parent 1e4f3ac commit cd19546
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/kernels/portAttributeProvider.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class PortAttributesProviders implements PortAttributesProvider, IExtensi
): PortAttributes | undefined {
try {
if (UsedPorts.has(port)) {
return new PortAttributes(port, PortAutoForwardAction.Ignore);
return new PortAttributes(PortAutoForwardAction.Ignore);
}
} catch (ex) {
// In case proposed API changes.
Expand Down
9 changes: 1 addition & 8 deletions src/test/mocks/vsc/extHostedTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2398,23 +2398,16 @@ export namespace vscMockExtHostedTypes {
}

export class PortAttributes {
/**
* The port number associated with this this set of attributes.
*/
port: number;

/**
* The action to be taken when this port is detected for auto forwarding.
*/
autoForwardAction: PortAutoForwardAction;

/**
* Creates a new PortAttributes object
* @param port the port number
* @param autoForwardAction the action to take when this port is detected
*/
constructor(port: number, autoForwardAction: PortAutoForwardAction) {
this.port = port;
constructor(autoForwardAction: PortAutoForwardAction) {
this.autoForwardAction = autoForwardAction;
}
}
Expand Down

0 comments on commit cd19546

Please sign in to comment.