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
## Q. How to implement class constants in TypeScript?
103
103
104
-
In TypeScript, the `const` keyword cannot be used to declare class properties. Doing so causes the compiler to an error with "A class member cannot have the 'const' keyword." TypeScript 2.0 has the `readonly` modifier.
104
+
In TypeScript, the **const** keyword cannot be used to declare class properties. Doing so causes the compiler to an error with **A class member cannot have the 'const' keyword.** TypeScript 2.0 has the **readonly** modifier.
0 commit comments