Skip to content

Commit af883c5

Browse files
committed
Use assertNever for typecheck friendliness
1 parent e3049c8 commit af883c5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

internal-packages/run-engine/src/engine/systems/waitpointSystem.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { EnqueueSystem } from "./enqueueSystem.js";
1515
import { ExecutionSnapshotSystem, getLatestExecutionSnapshot } from "./executionSnapshotSystem.js";
1616
import { SystemResources } from "./systems.js";
1717
import { ReleaseConcurrencySystem } from "./releaseConcurrencySystem.js";
18+
import { assertNever } from "assert-never";
1819

1920
export type WaitpointSystemOptions = {
2021
resources: SystemResources;
@@ -719,9 +720,7 @@ export class WaitpointSystem {
719720
break;
720721
}
721722
default: {
722-
throw new Error(
723-
`continueRunIfUnblocked: invalid execution status: ${snapshot.executionStatus}`
724-
);
723+
assertNever(snapshot.executionStatus);
725724
}
726725
}
727726

0 commit comments

Comments
 (0)