From 4184527d0dd0b4f6eaf2cbbe367690741814bd9f Mon Sep 17 00:00:00 2001 From: BluJ Date: Mon, 3 Apr 2023 13:46:09 -0600 Subject: [PATCH] chore: Add the error case just in case --- lib/config/builder/config-types.test.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/config/builder/config-types.test.ts b/lib/config/builder/config-types.test.ts index 7173886..101aada 100644 --- a/lib/config/builder/config-types.test.ts +++ b/lib/config/builder/config-types.test.ts @@ -1,8 +1,4 @@ -import { - ListValueSpecOf, - ValueSpecList, - isValueSpecListOf, -} from "../config-types"; +import { ListValueSpecOf, ValueSpecList, isValueSpecListOf } from "../config-types"; import { Config } from "./config"; import { List } from "./list"; import { Value } from "./value"; @@ -19,6 +15,8 @@ describe("Config Types", () => { someList.spec satisfies ListValueSpecOf<"number">; } else if (isValueSpecListOf(someList, "object")) { someList.spec satisfies ListValueSpecOf<"object">; + } else { + throw new Error("Failed to figure out the type: " + JSON.stringify(someList)); } } });