Skip to content

Commit 54dd42b

Browse files
committed
fix(docs): translate inserted blocks in forms/signals/models
1 parent 8566571 commit 54dd42b

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

  • adev-ja/src/content/guide/forms/signals

adev-ja/src/content/guide/forms/signals/models.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ export class LoginComponent {
4040

4141
`[formField]`ディレクティブは、各入力要素をフィールドツリー内の対応するフィールドにバインドし、UIとモデル間の自動的な双方向同期を可能にします。
4242

43-
### Supported model structures
43+
### サポートされるモデル構造 {#supported-model-structures}
4444

45-
シグナルフォームbuilds the field tree by walking your model. The objects and arrays it walks through (the **structural layer**) must be plain JavaScript objects and arrays. The values at the **leaves** (positions with no nested fields) are usually primitives (strings, numbers, booleans) or `null`. Native `date`, `month`, `time`, and `week` inputs also accept `Date`, and custom controls can accept any value type they understand.
45+
シグナルフォームはモデルを走査してフィールドツリーを構築します。走査されるオブジェクトと配列(**構造レイヤー**)は、プレーンなJavaScriptオブジェクトと配列でなければなりません。**リーフ**(ネストされたフィールドを持たない位置)の値は、通常プリミティブ(文字列、数値、真偽値)または `null` です。ネイティブの `date``month``time``week` 入力は `Date` も受け入れ、カスタムコントロールは理解できる任意の値型を受け入れます。
4646

4747
```ts {prefer, header: 'Plain structure'}
4848
interface UserFormModel {
@@ -66,13 +66,13 @@ const userModel = signal<UserFormModel>({
6666
});
6767
```
6868

69-
IMPORTANT: Class instances, `Map`, and `Set` are **not supported in the structural layer**, even though TypeScript will accept them. シグナルフォームdoes not validate the model shape at runtime, so the framework accepts these values without throwing, then produces incorrect behavior in different ways depending on shape:
69+
IMPORTANT: クラスインスタンス、`Map``Set` は、TypeScriptが受け入れるとしても**構造レイヤーではサポートされません**。シグナルフォームは実行時にモデルの形状を検証しないため、フレームワークはこれらの値を例外を投げずに受け入れ、その後、形状に応じて異なる形で誤った挙動を引き起こします:
7070

71-
- **Class instances** lose their prototype on the first write becauseシグナルフォームshallow-copies parent objects on update. Methods, getters, and `instanceof` checks are gone afterward.
72-
- **Non-extensible or frozen objects inside arrays** throw whenシグナルフォームassigns a tracking symbol to preserve item identity across reorders.
73-
- **`Map` and `Set`** produce empty field trees, becauseシグナルフォームenumerates children with `Object.keys`.
71+
- **クラスインスタンス**は、シグナルフォームが更新時に親オブジェクトをシャローコピーするため、最初の書き込みでプロトタイプを失います。それ以降、メソッド、ゲッター、`instanceof` チェックは機能しなくなります。
72+
- **配列内の拡張不可または凍結されたオブジェクト**は、シグナルフォームが並び替え時にアイテムの同一性を保持するためのトラッキングシンボルを割り当てる際に例外を投げます。
73+
- **`Map` および `Set`** は、シグナルフォームが `Object.keys` で子要素を列挙するため、空のフィールドツリーを生成します。
7474

75-
If your application uses classes for domain modeling, translate to plain objects at the form boundary. See [Translating between form model and domain model](guide/forms/signals/model-design#translating-between-form-model-and-domain-model).
75+
アプリケーションがドメインモデリングにクラスを使用している場合は、フォームの境界でプレーンなオブジェクトに変換してください。[フォームモデルとドメインモデル間の変換](guide/forms/signals/model-design#translating-between-form-model-and-domain-model)を参照してください。
7676

7777
### TypeScriptの型を使用する {#using-typescript-types}
7878

0 commit comments

Comments
 (0)