From f5ffb92d5a03ecb14ec6952d8dff0d8ec101df35 Mon Sep 17 00:00:00 2001 From: Michael Courtin Date: Mon, 30 Aug 2021 16:10:23 +0200 Subject: [PATCH] fix: check for req function onPluginInit in isCactusPlugin interface i-cactus-plugin in the function isICactusPlugin is not checking for required onPluginInit Closes: #1277 Signed-off-by: Michael Courtin --- .../src/main/typescript/plugin/i-cactus-plugin.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cactus-core-api/src/main/typescript/plugin/i-cactus-plugin.ts b/packages/cactus-core-api/src/main/typescript/plugin/i-cactus-plugin.ts index 8f2a7a7170..9337719e25 100644 --- a/packages/cactus-core-api/src/main/typescript/plugin/i-cactus-plugin.ts +++ b/packages/cactus-core-api/src/main/typescript/plugin/i-cactus-plugin.ts @@ -76,6 +76,7 @@ export function isICactusPlugin(x: unknown): x is ICactusPlugin { return ( !!x && typeof (x as ICactusPlugin).getPackageName === "function" && - typeof (x as ICactusPlugin).getInstanceId === "function" + typeof (x as ICactusPlugin).getInstanceId === "function" && + typeof (x as ICactusPlugin).onPluginInit === "function" ); }