Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
Rename a type definition
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
  • Loading branch information
Jérôme Benoit committed Apr 15, 2022
1 parent f7f98c6 commit be9b0d5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/charging-station/ocpp/1.6/OCPP16RequestService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { OCPP16ServiceUtils } from './OCPP16ServiceUtils';
import OCPPError from '../../../exception/OCPPError';
import OCPPRequestService from '../OCPPRequestService';
import type OCPPResponseService from '../OCPPResponseService';
import { SendParams } from '../../../types/ocpp/Requests';
import { RequestParams } from '../../../types/ocpp/Requests';
import Utils from '../../../utils/Utils';

const moduleName = 'OCPP16RequestService';
Expand All @@ -25,7 +25,7 @@ export default class OCPP16RequestService extends OCPPRequestService {
public async requestHandler<Request extends JsonType, Response extends JsonType>(
commandName: OCPP16RequestCommand,
commandParams?: JsonType,
params?: SendParams
params?: RequestParams
): Promise<Response> {
if (Object.values(OCPP16RequestCommand).includes(commandName)) {
return (await this.sendMessage(
Expand Down
8 changes: 4 additions & 4 deletions src/charging-station/ocpp/OCPPRequestService.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
IncomingRequestCommand,
RequestCommand,
RequestParams,
ResponseType,
SendParams,
} from '../../types/ocpp/Requests';

import type ChargingStation from '../ChargingStation';
Expand Down Expand Up @@ -92,7 +92,7 @@ export default abstract class OCPPRequestService {
messageId: string,
messagePayload: JsonType,
commandName: RequestCommand,
params: SendParams = {
params: RequestParams = {
skipBufferingOnError: false,
triggerMessage: false,
}
Expand All @@ -115,7 +115,7 @@ export default abstract class OCPPRequestService {
messagePayload: JsonType | OCPPError,
messageType: MessageType,
commandName?: RequestCommand | IncomingRequestCommand,
params: SendParams = {
params: RequestParams = {
skipBufferingOnError: false,
triggerMessage: false,
}
Expand Down Expand Up @@ -338,6 +338,6 @@ export default abstract class OCPPRequestService {
public abstract requestHandler<Request extends JsonType, Response extends JsonType>(
commandName: RequestCommand,
commandParams?: JsonType,
params?: SendParams
params?: RequestParams
): Promise<Response>;
}
2 changes: 1 addition & 1 deletion src/types/ocpp/Requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { OCPP16DiagnosticsStatus } from './1.6/DiagnosticsStatus';
import { OCPP16MeterValuesRequest } from './1.6/MeterValues';
import OCPPError from '../../exception/OCPPError';

export interface SendParams {
export interface RequestParams {
skipBufferingOnError?: boolean;
triggerMessage?: boolean;
}
Expand Down

0 comments on commit be9b0d5

Please sign in to comment.