chore: Add the error case just in case

This commit is contained in:
BluJ
2023-04-03 13:46:09 -06:00
parent 82e96eb18e
commit 4184527d0d

View File

@@ -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));
}
}
});