From b68d3a6e78c4dc6a045d6edec892fc38c55fddb6 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Mon, 7 Nov 2022 11:12:15 -0500 Subject: [PATCH] Remove dead code Signed-off-by: Sebastian Malton --- .../runnable/throw-with-incorrect-hierarchy-for.ts | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 src/common/runnable/throw-with-incorrect-hierarchy-for.ts diff --git a/src/common/runnable/throw-with-incorrect-hierarchy-for.ts b/src/common/runnable/throw-with-incorrect-hierarchy-for.ts deleted file mode 100644 index bddf8037c2..0000000000 --- a/src/common/runnable/throw-with-incorrect-hierarchy-for.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (c) OpenLens Authors. All rights reserved. - * Licensed under MIT License. See LICENSE in root directory for more information. - */ -import type { Runnable } from "./run-many-for"; -import type { RunnableSync } from "./run-many-sync-for"; - -export const throwWithIncorrectHierarchyFor = (injectionTokenId: string, allRunnables: Runnable[] | RunnableSync[]) => ( - (runnable: Runnable | RunnableSync) => { - if (runnable.runAfter && !allRunnables.includes(runnable.runAfter)) { - throw new Error(`Tried to run runnable "${runnable.id}" after the runnable "${runnable.runAfter.id}" which does not share the "${injectionTokenId}" injection token.`); - } - } -);