chore: switch coding style to JS standard
[e-mobility-charging-stations-simulator.git] / src / exception / OCPPError.ts
index 4fb9ea165a1a827d952a7422e4f13c423061deef..d6347652dad92d82d6ca9234e6f72f0b13e22a68 100644 (file)
@@ -1,30 +1,29 @@
 // Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
 
-import { BaseError } from './BaseError.js';
+import { BaseError } from './BaseError.js'
 import {
-  ErrorType,
+  type ErrorType,
   type IncomingRequestCommand,
   type JsonType,
-  type RequestCommand,
-} from '../types/index.js';
-import { Constants } from '../utils/index.js';
+  type RequestCommand
+} from '../types/index.js'
+import { Constants } from '../utils/index.js'
 
 export class OCPPError extends BaseError {
-  code: ErrorType;
-  command?: RequestCommand | IncomingRequestCommand;
-  details?: JsonType;
+  code: ErrorType
+  command?: RequestCommand | IncomingRequestCommand
+  details?: JsonType
 
-  constructor(
+  constructor (
     code: ErrorType,
     message: string,
     command?: RequestCommand | IncomingRequestCommand,
-    details?: JsonType,
+    details?: JsonType
   ) {
-    super(message);
+    super(message)
 
-    this.code = code;
-    this.command =
-      command ?? (Constants.UNKNOWN_COMMAND as RequestCommand | IncomingRequestCommand);
-    this.details = details;
+    this.code = code
+    this.command = command ?? (Constants.UNKNOWN_COMMAND as RequestCommand | IncomingRequestCommand)
+    this.details = details
   }
 }