Skip to content

Commit

Permalink
Make connectArgs optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Eduardo Libardo committed Dec 18, 2024
1 parent 811dcdc commit 96fb336
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cp/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ export default class ChargePoint {
private readonly csUrl: string
) { }

async connect(connectArgs: ConnectArgs): Promise<Connection<CentralSystemAction<'v1.6-json'>>> {
async connect(connectArgs?: ConnectArgs): Promise<Connection<CentralSystemAction<'v1.6-json'>>> {
const url = `${this.csUrl}/${this.id}`;
const socket = new WebSocket(url, SUPPORTED_PROTOCOLS, {
auth: `${this.id}:${connectArgs.auth}`,
auth: `${this.id}:${connectArgs?.auth}`,
...connectArgs,
});

Expand Down

0 comments on commit 96fb336

Please sign in to comment.