mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +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() {
|
toJSON() {
|
||||||
return {
|
return {
|
||||||
//name: this.name,
|
// @todo: current workaround because of fixed string type
|
||||||
type: this.type,
|
type: this.type as any,
|
||||||
config: this.config
|
config: this.config
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,12 +56,13 @@ export type ModuleSchemas = {
|
|||||||
export type ModuleConfigs = {
|
export type ModuleConfigs = {
|
||||||
[K in keyof ModuleSchemas]: Static<ModuleSchemas[K]>;
|
[K in keyof ModuleSchemas]: Static<ModuleSchemas[K]>;
|
||||||
};
|
};
|
||||||
|
type PartialRec<T> = { [P in keyof T]?: PartialRec<T[P]> };
|
||||||
|
|
||||||
export type InitialModuleConfigs =
|
export type InitialModuleConfigs =
|
||||||
| ({
|
| ({
|
||||||
version: number;
|
version: number;
|
||||||
} & ModuleConfigs)
|
} & ModuleConfigs)
|
||||||
| Partial<ModuleConfigs>;
|
| PartialRec<ModuleConfigs>;
|
||||||
|
|
||||||
export type ModuleManagerOptions = {
|
export type ModuleManagerOptions = {
|
||||||
initial?: InitialModuleConfigs;
|
initial?: InitialModuleConfigs;
|
||||||
|
|||||||
Reference in New Issue
Block a user