You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constx=1; // Compiler "inlined"; NOT the same as JS const
28
27
```
29
28
30
29
</template>
@@ -33,7 +32,7 @@ const x = 1; // Compiler "inlined"; NOT the same as JS const
33
32
::: warning Use C# `record` classes for immutability
34
33
C#'s `const` keyword does not mean the same thing as in JS. [See the docs](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/const) to understand the `const` designator in C#.
35
34
36
-
To achieve immutability, use C# `record`class classes with positional properties (which we'll visit later in [Classes and Types](./classes.md#record-classes)).
35
+
To achieve immutability, use C# `record` classes with positional properties (which we'll visit later in [Classes and Types](./classes.md#record-classes)).
37
36
:::
38
37
39
38
## Explicit Types
@@ -57,6 +56,7 @@ let map = new Map();
57
56
// Primitives
58
57
intx=1;
59
58
stringy="";
59
+
constintx=1; // Compiler "inlined"; NOT the same as JS const
0 commit comments