mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
fix typings for initial partial config
Signed-off-by: dswbx <dennis.senn@gmx.ch>
This commit is contained in:
@@ -236,8 +236,8 @@ export abstract class Field<
|
||||
|
||||
toJSON() {
|
||||
return {
|
||||
//name: this.name,
|
||||
type: this.type,
|
||||
// @todo: current workaround because of fixed string type
|
||||
type: this.type as any,
|
||||
config: this.config
|
||||
};
|
||||
}
|
||||
|
||||
@@ -56,12 +56,13 @@ export type ModuleSchemas = {
|
||||
export type ModuleConfigs = {
|
||||
[K in keyof ModuleSchemas]: Static<ModuleSchemas[K]>;
|
||||
};
|
||||
type PartialRec<T> = { [P in keyof T]?: PartialRec<T[P]> };
|
||||
|
||||
export type InitialModuleConfigs =
|
||||
| ({
|
||||
version: number;
|
||||
} & ModuleConfigs)
|
||||
| Partial<ModuleConfigs>;
|
||||
| PartialRec<ModuleConfigs>;
|
||||
|
||||
export type ModuleManagerOptions = {
|
||||
initial?: InitialModuleConfigs;
|
||||
|
||||
Reference in New Issue
Block a user