Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/content/docs/zh-cn/guides/environment-variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ PUBLIC_ANYBODY=there

当在 `.env.[mode]` 文件中定义了更多的自定义环境变量,你可能想要得到以 `PUBLIC_` 前缀的自定义环境变量的 TypeScript 智能提示。

为了实现这一点,你可以在 `src/` 中创建一个 `env.d.ts`,并配置 `ImportMetaEnv`:
为了实现这一点,你可以在 `src/` 中创建一个 `env.d.ts`,以 [扩展全局类型](/zh-cn/guides/typescript/#扩展全局类型) 并配置 `ImportMetaEnv`:

```ts title="src/env.d.ts"
interface ImportMetaEnv {
Expand Down