From 3b322cd852010f337cb43a076d661260c5fa7246 Mon Sep 17 00:00:00 2001 From: jinzhongjia Date: Mon, 13 May 2024 00:05:39 +0800 Subject: [PATCH] =?UTF-8?q?[Little=20Change]:=20=E9=87=8D=E5=86=99?= =?UTF-8?q?=E4=BA=86=E6=A8=A1=E5=9D=97=E7=B3=BB=E7=BB=9F=E5=85=B3=E4=BA=8E?= =?UTF-8?q?=E7=9C=81=E7=95=A5=20`config`=20key=20=E7=9A=84=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=20(#159)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Little Change]:重写关于省略 `config` 的声明 * [Little Change]:rewrite about "emit declaration of `config`" --- docs/other-usage-of-flakes/module-system.md | 6 +++--- docs/zh/other-usage-of-flakes/module-system.md | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/other-usage-of-flakes/module-system.md b/docs/other-usage-of-flakes/module-system.md index 288ace3..3f07e78 100644 --- a/docs/other-usage-of-flakes/module-system.md +++ b/docs/other-usage-of-flakes/module-system.md @@ -202,9 +202,9 @@ for `foo` by setting the `options` defined here. For example: ``` In the example above, the way we assign values to `options` is actually a kind of -**abbreviation**. When a module declares only `options` without `config` (and other -special parameters of the module system), we can omit the `config` prefix and directly use -the name of `options` for assignment. +**abbreviation**. When a module only contains `config` without any other delcaration (like `option` and other +special parameters of the module system), we can omit the `config` wrapping , just directly write the +content of `config` to assign value to `option` section declared in other modules! ## Assignment and Lazy Evaluation in the Module System diff --git a/docs/zh/other-usage-of-flakes/module-system.md b/docs/zh/other-usage-of-flakes/module-system.md index def4a6e..289a693 100644 --- a/docs/zh/other-usage-of-flakes/module-system.md +++ b/docs/zh/other-usage-of-flakes/module-system.md @@ -183,9 +183,8 @@ foo 的自定义配置了,示例: } ``` -上面这个例子中我们为 `options` 赋值的方式实际上是一种**缩写**,当一个模块中只声明了 -`options`,而没有声明 `config` (以及其他模块系统的特殊参数)时,我们可以省略掉 `config` -前缀,直接使用 `options` 的名称进行赋值。 +上面这个例子中我们为 `options` 赋值的方式实际上是一种**缩写**,当一个模块中只包含定义(`config`),而没有声明(`option`,并且没有其他特殊参数)时,我们可以省略掉 `config` +包装,直接书写 `config` 部分来对其他模块中已声明的 `option` 赋值。 ## 模块系统的赋值与延迟求值 {#module-system-assignment-and-lazy-evaluation}