mirror of
https://github.com/sern-handler/website
synced 2026-06-28 02:32:23 +00:00
fix: JSX issue
This commit is contained in:
@@ -55,30 +55,32 @@ export default commandModule({
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="good" label="A good example">
|
||||
|
||||
```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');
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="bad" label="Don't do this!>
|
||||
|
||||
```ts title="index.ts"
|
||||
<TabItem value="bad" label="Don't do this">
|
||||
|
||||
```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()
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
|
||||
</Tabs>
|
||||
|
||||
- Services can only be used after sern has made dependencies.
|
||||
|
||||
Reference in New Issue
Block a user