Skip to content

Commit

Permalink
fix(common): make ExtraModuleDefinitionOptions partial in type
Browse files Browse the repository at this point in the history
  • Loading branch information
twchn committed Sep 16, 2022
1 parent 7db5638 commit c36d6ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export type ConfigurableModuleCls<
new (): any;
} & Record<
`${MethodKey}`,
(options: ModuleOptions & ExtraModuleDefinitionOptions) => DynamicModule
(
options: ModuleOptions & Partial<ExtraModuleDefinitionOptions>,
) => DynamicModule
> &
Record<
`${MethodKey}Async`,
Expand All @@ -30,6 +32,6 @@ export type ConfigurableModuleCls<
ModuleOptions,
FactoryClassMethodKey
> &
ExtraModuleDefinitionOptions,
Partial<ExtraModuleDefinitionOptions>,
) => DynamicModule
>;
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export interface ConfigurableModuleHost<
ModuleOptions,
FactoryClassMethodKey
> &
ExtraModuleDefinitionOptions;
Partial<ExtraModuleDefinitionOptions>;
/**
* Can be used to auto-infer the compound "module options" type (options interface + extra module definition options).
* Note: this property is not supposed to be used as a value.
Expand All @@ -73,5 +73,5 @@ export interface ConfigurableModuleHost<
* }
* ```
*/
OPTIONS_TYPE: ModuleOptions & ExtraModuleDefinitionOptions;
OPTIONS_TYPE: ModuleOptions & Partial<ExtraModuleDefinitionOptions>;
}

0 comments on commit c36d6ba

Please sign in to comment.