mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-30 12:21:57 +00:00
chore: Add the error case just in case
This commit is contained in:
@@ -1,8 +1,4 @@
|
|||||||
import {
|
import { ListValueSpecOf, ValueSpecList, isValueSpecListOf } from "../config-types";
|
||||||
ListValueSpecOf,
|
|
||||||
ValueSpecList,
|
|
||||||
isValueSpecListOf,
|
|
||||||
} from "../config-types";
|
|
||||||
import { Config } from "./config";
|
import { Config } from "./config";
|
||||||
import { List } from "./list";
|
import { List } from "./list";
|
||||||
import { Value } from "./value";
|
import { Value } from "./value";
|
||||||
@@ -19,6 +15,8 @@ describe("Config Types", () => {
|
|||||||
someList.spec satisfies ListValueSpecOf<"number">;
|
someList.spec satisfies ListValueSpecOf<"number">;
|
||||||
} else if (isValueSpecListOf(someList, "object")) {
|
} else if (isValueSpecListOf(someList, "object")) {
|
||||||
someList.spec satisfies ListValueSpecOf<"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