chore: simplify the type of of in the config

This commit is contained in:
BluJ
2023-02-14 15:30:12 -07:00
parent ef41ce7762
commit 93e27d8bf4

View File

@@ -13,7 +13,7 @@ export class Config<A extends ConfigSpec> extends IBuilder<A> {
return Config.empty().withValue(key, value);
}
static of<B extends { [key: string]: Value<C> }, C extends ValueSpec>(spec: B) {
static of<B extends { [key: string]: Value<ValueSpec> }>(spec: B) {
// deno-lint-ignore no-explicit-any
const answer: { [K in keyof B]: BuilderExtract<B[K]> } = {} as any;
for (const key in spec) {