From 55db60abbac93922ec82de1e53d7c2d49c66c399 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Wed, 2 Nov 2022 16:09:48 -0400 Subject: [PATCH] Add check that runManySync actually doesn't have promises Signed-off-by: Sebastian Malton --- src/common/runnable/run-many-sync-for.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/runnable/run-many-sync-for.ts b/src/common/runnable/run-many-sync-for.ts index e59ab0a871..c908e90641 100644 --- a/src/common/runnable/run-many-sync-for.ts +++ b/src/common/runnable/run-many-sync-for.ts @@ -19,7 +19,7 @@ type RunSync = (parameter: Param) => void; export type RunManySync = (injectionToken: InjectionToken, void>) => RunSync; function runCompositeRunnableSyncs(param: Param, composite: Composite>) { - assert(!((composite.value.run(param) as any) instanceof Promise), "Cannot be an async function for runnable sync"); + assert(!((composite.value.run(param) as unknown) instanceof Promise), `Cannot be an async function for runnable sync`); composite.children.map(composite => runCompositeRunnableSyncs(param, composite)); }