mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Remove dead code
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
7c53f6e2d9
commit
b68d3a6e78
@ -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<any>[] | RunnableSync<any>[]) => (
|
||||
(runnable: Runnable<any> | RunnableSync<any>) => {
|
||||
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.`);
|
||||
}
|
||||
}
|
||||
);
|
||||
Loading…
Reference in New Issue
Block a user