From 19eae9076dc41d75d2774d97da4d26d6c57a8b9b Mon Sep 17 00:00:00 2001 From: Kyle Hensel Date: Mon, 8 Dec 2025 20:55:23 +1100 Subject: [PATCH] [CHANGES.md] replace bitwise-OR with logical-OR for expando declarations --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 86394dfcc0..4e31e6fdb7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -51,7 +51,7 @@ f.called = false; | Name | Example | Substitute | Note | | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| Fallback initialisers | `f.x = f.x \| init` | `if (!f.x) f.x = init` | | +| Fallback initialisers | `f.x = f.x \|\| init` | `if (!f.x) f.x = init` | | | Nested, undeclared expandos |
var N = {};
N.X.Y = {}
|
var N = {};
N.X = {};
N.X.Y = {}
| All intermediate expandos have to be assigned. Closure feature. | | Constructor function whole-prototype assignment |
C.prototype = {
m: function() { }
n: function() { }
}
|
C.prototype.m = function() { }
C.prototype.n = function() { }
| Constructor function feature. See note at end. | | Identifier declarations |
class C {
constructor() {
/\** @type {T} */
identifier;
}
}
|
class C {
/\** @type {T} */
identifier;
constructor() { }
}
| Closure feature. |