mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-26 02:11:56 +00:00
chore: Add the error case just in case
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user