diff --git a/docs/guide/walkthrough/services.md b/docs/guide/walkthrough/services.md index e957f789f..2756c2eea 100644 --- a/docs/guide/walkthrough/services.md +++ b/docs/guide/walkthrough/services.md @@ -55,30 +55,32 @@ export default commandModule({ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; + -```ts title="index.ts" +```ts title="index.ts" showLineNumbers await makeDependencies(...pass your options here) ``` - -```ts title="commands/ping.ts +```ts title="commands/ping.ts" showLineNumbers // This is guaranteed to be defined if configured correctly import { Service } from '@sern/handler'; const client = Service('@sern/client'); ``` - - + +```ts title="index.ts" showLineNumbers import { Service, makeDependencies } from '@sern/handler'; /* DON'T USE SERVICES BEFORE CALLING makeDependencies */ const logger = Service('@sern/logger'); await makeDependencies() ``` + + - Services can only be used after sern has made dependencies.