docs: fix helloWorldLoader function definition (#8429)
- Make helloWorldLoader async to follow the type definition Closes #8428
This commit is contained in:
1 parent
a392b2be0c
commit
ec0a68ec88
3 files changed
+3
-3
No files matched your search
@@ -56,7 +56,7 @@ import {
|
|||||||
} from "@medusajs/modules-sdk"
|
} from "@medusajs/modules-sdk"
|
||||||
import { Logger } from "@medusajs/medusa"
|
import { Logger } from "@medusajs/medusa"
|
||||||
|
|
||||||
export default function helloWorldLoader({
|
export default async function helloWorldLoader({
|
||||||
container,
|
container,
|
||||||
}: LoaderOptions) {
|
}: LoaderOptions) {
|
||||||
const logger: Logger = container.resolve("logger")
|
const logger: Logger = container.resolve("logger")
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ type ModuleOptions = {
|
|||||||
capitalize?: boolean
|
capitalize?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function helloWorldLoader({
|
export default async function helloWorldLoader({
|
||||||
options,
|
options,
|
||||||
}: LoaderOptions<ModuleOptions>) {
|
}: LoaderOptions<ModuleOptions>) {
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ A loader is created in a TypeScript or JavaScript file under a module's `loaders
|
|||||||
For example, create the file `src/modules/hello/loaders/hello-world.ts` with the following content:
|
For example, create the file `src/modules/hello/loaders/hello-world.ts` with the following content:
|
||||||
|
|
||||||
```ts title="src/modules/hello/loaders/hello-world.ts"
|
```ts title="src/modules/hello/loaders/hello-world.ts"
|
||||||
export default function helloWorldLoader() {
|
export default async function helloWorldLoader() {
|
||||||
console.log(
|
console.log(
|
||||||
"[HELLO MODULE] Just started the Medusa application!"
|
"[HELLO MODULE] Just started the Medusa application!"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in new issue
Block a user