messageId: string,
messagePayload: JsonType,
commandName: RequestCommand,
- params: RequestParams = defaultRequestParams,
+ params?: RequestParams,
): Promise<ResponseType> {
params = {
...defaultRequestParams,
messagePayload: JsonType | OCPPError,
messageType: MessageType,
commandName: RequestCommand | IncomingRequestCommand,
- params: RequestParams = defaultRequestParams,
+ params?: RequestParams,
): Promise<ResponseType> {
params = {
...defaultRequestParams,
PerformanceStatistics.endMeasure(commandName, beginId);
}
const wsClosedOrErrored = !wsOpened || sendError === true;
- if (wsClosedOrErrored && params.skipBufferingOnError === false) {
+ if (wsClosedOrErrored && params?.skipBufferingOnError === false) {
// Buffer
chargingStation.bufferMessage(messageToSend);
// Reject and keep request in the cache