chore: use loaded module reference (#5763)
This commit is contained in:
1 parent
bc79edfa67
commit
d85fee42ee
25 files changed
+291
-191
No files matched your search
@@ -36,7 +36,7 @@ export type InternalModuleDeclaration = {
|
||||
resources: MODULE_RESOURCE_TYPE
|
||||
dependencies?: string[]
|
||||
definition?: ModuleDefinition // That represent the definition of the module, such as the one we have for the medusa supported modules. This property is used for custom made modules.
|
||||
resolve?: string
|
||||
resolve?: string | ModuleExports
|
||||
options?: Record<string, unknown>
|
||||
/**
|
||||
* If multiple modules are registered with the same key, the alias can be used to differentiate them
|
||||
@@ -227,14 +227,20 @@ export declare type ModuleJoinerRelationship = JoinerRelationship & {
|
||||
export type ModuleExports = {
|
||||
service: Constructor<any>
|
||||
loaders?: ModuleLoaderFunction[]
|
||||
/**
|
||||
* @deprecated property will be removed in future versions
|
||||
*/
|
||||
migrations?: any[]
|
||||
/**
|
||||
* @deprecated property will be removed in future versions
|
||||
*/
|
||||
models?: Constructor<any>[]
|
||||
runMigrations?(
|
||||
options: LoaderOptions,
|
||||
options: LoaderOptions<any>,
|
||||
moduleDeclaration?: InternalModuleDeclaration
|
||||
): Promise<void>
|
||||
revertMigration?(
|
||||
options: LoaderOptions,
|
||||
options: LoaderOptions<any>,
|
||||
moduleDeclaration?: InternalModuleDeclaration
|
||||
): Promise<void>
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user