From 230c7bf0175b53061f6466cba5654237712395fb Mon Sep 17 00:00:00 2001 From: George Kurelic Date: Mon, 18 Dec 2023 17:07:01 -0600 Subject: [PATCH 1/2] 02-types.md add new typedef extension syntax --- content/02-types.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/content/02-types.md b/content/02-types.md index 790981d6..17594f81 100644 --- a/content/02-types.md +++ b/content/02-types.md @@ -573,6 +573,11 @@ class Path { You may also use [Extensions](types-structure-extensions) to "inherit" fields from other structures: +```haxe +typedef Point3 = Point & { z : Int } +``` +Or the older syntax: + ```haxe typedef Point3 = { > Point, z : Int } ``` From 1972fcd26dbfaac48d7dfdd85b5c8d267886d5fe Mon Sep 17 00:00:00 2001 From: George Kurelic Date: Mon, 18 Dec 2023 17:08:54 -0600 Subject: [PATCH 2/2] formatting --- content/02-types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/02-types.md b/content/02-types.md index 17594f81..c4c3fa62 100644 --- a/content/02-types.md +++ b/content/02-types.md @@ -576,8 +576,8 @@ You may also use [Extensions](types-structure-extensions) to "inherit" fields fr ```haxe typedef Point3 = Point & { z : Int } ``` -Or the older syntax: +Or the older syntax: ```haxe typedef Point3 = { > Point, z : Int } ```