chore: Update the types for autoconfig

This commit is contained in:
BluJ
2023-04-24 13:24:57 -06:00
parent 0e3bf38ed4
commit 0be8d9d5bc
6 changed files with 49 additions and 31 deletions

View File

@@ -6,6 +6,7 @@ import {
ValueSpec as ValueSpecAny,
InputSpec,
} from "../config/configTypes";
import { Config } from "../config/builder/config";
const {
string,
@@ -110,6 +111,7 @@ export type GuardAll<A> = GuardNumber<A> &
GuardDatetime<A>;
// prettier-ignore
export type TypeFromProps<A> =
A extends Config<infer B> ? TypeFromProps<B> :
A extends Record<string, unknown> ? { [K in keyof A & string]: _<GuardAll<A[K]>> } :
unknown;