Skip to content

Commit

Permalink
chore(doc): update way of import zod code
Browse files Browse the repository at this point in the history
  • Loading branch information
suhaotian committed Oct 20, 2024
1 parent b9f8431 commit 9f6b725
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .vscode/tsdk.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"scope": "typescript",
"prefix": "apii",
"body": [
"import { z } from 'zod';",
"import * as z from 'zod';",
"import { transformPath, APIConfig, ObjectLiteral } from '@/src/shared/tsdk-helper';"
],
"description": "api config import snippet"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { z } from 'zod';
import * as z from 'zod';

import { transformPath, APIConfig, ObjectLiteral } from '@/src/shared/tsdk-helper';

Expand Down
2 changes: 1 addition & 1 deletion examples/server/src/shared/tsdk-types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { z } from 'zod';
import * as z from 'zod';

export interface APIConfig {
/** The API type. Like: user side or admin side, required. */
Expand Down
2 changes: 1 addition & 1 deletion examples/server/src/shared/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { z } from 'zod';
import * as z from 'zod';

/**
* Math sum
Expand Down
2 changes: 1 addition & 1 deletion packages/bench/src/shared/tsdk-types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { z } from 'zod';
import * as z from 'zod';

export const APITypes = {
user: 'user',
Expand Down
2 changes: 1 addition & 1 deletion website/components/home.en-US/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ import { Tabs } from 'nextra-theme-docs';
Define the API config:

```ts filename="Hello.apiconf.ts"
import { z } from 'zod';
import * as z from 'zod';
import { APIConfig, transformPath } from '@/src/shared/tsdk-helper';

/**
Expand Down
2 changes: 1 addition & 1 deletion website/components/home.zh-CN/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ import { Tabs } from 'nextra-theme-docs';
声明接口配置:

```ts filename="Hello.apiconf.ts"
import { z } from 'zod';
import * as z from 'zod';
import { APIConfig, transformPath } from '@/src/shared/tsdk-helper';

/**
Expand Down
2 changes: 1 addition & 1 deletion website/pages/docs/guide/apiconf.en-US.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
`APIConfig` defined the basic configuration specifications of API:

```ts filename="src/shared/tsdk-types.ts" copy
import { z } from 'zod';
import * as z from 'zod';

export const APITypes = {
user: 'user',
Expand Down
2 changes: 1 addition & 1 deletion website/pages/docs/guide/apiconf.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
`APIConfig` 定义了 tsdk 的 API 基本配置规范,内容如下:

```ts filename="src/shared/tsdk-types.ts" copy
import { z } from 'zod';
import * as z from 'zod';

export const APITypes = {
user: 'user',
Expand Down
2 changes: 1 addition & 1 deletion website/pages/docs/quick-start/hello-world-api.en-US.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ import { Callout } from 'nextra/components';
</Callout>

```ts filename="server/src/Hello.apiconf.ts" copy
import { z } from 'zod';
import * as z from 'zod';
import { APIConfig, transformPath } from '@/src/shared/tsdk-helper';

/**
Expand Down
2 changes: 1 addition & 1 deletion website/pages/docs/quick-start/hello-world-api.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ import { Callout } from 'nextra/components';
</Callout>

```ts filename="server/src/Hello.apiconf.ts" copy
import { z } from 'zod';
import * as z from 'zod';
import { APIConfig, transformPath } from '@/src/shared/tsdk-helper';

/**
Expand Down

0 comments on commit 9f6b725

Please sign in to comment.