From 958ce6aa4b05f7642e3203e3de1ea9d8f54552b0 Mon Sep 17 00:00:00 2001 From: "viviane.johns" Date: Mon, 16 Dec 2024 11:11:25 +0100 Subject: [PATCH] #664 :memo: added documentation for wlsException typeguard --- wls-gui-wahllokalsystem/src/api/WLSError.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wls-gui-wahllokalsystem/src/api/WLSError.ts b/wls-gui-wahllokalsystem/src/api/WLSError.ts index e34560060..8c6e1fcdb 100644 --- a/wls-gui-wahllokalsystem/src/api/WLSError.ts +++ b/wls-gui-wahllokalsystem/src/api/WLSError.ts @@ -32,6 +32,11 @@ export default class WLSError extends Error { this.service = service; } + /** + * Type guard to check if an object is a WLSException + * @param obj - The object to check + * @returns True if the object has all required WLSEexception properties with correct types + */ static isWLSException(obj: any): obj is WLSError { return ( obj &&