chore: Add topConfig

This commit is contained in:
BluJ
2023-05-02 10:45:05 -06:00
parent b58d58ca7c
commit 07251c91a6

View File

@@ -116,3 +116,8 @@ export class Config<Type extends Record<string, any>, WD, ConfigType> {
}
}
}
export function topConfig<WrapperData>() {
return <Type extends Record<string, any>>(spec: {
[K in keyof Type]: Value<Type[K], WrapperData, Type>
}) => Config.of<Type, WrapperData, Type>(spec)
}