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
When creating a class, if a parameter is added to the constructor as optional and given an accessor (such as private), the compiler generates it as an optional class member in the .d.ts file which then throws a syntax error.
Expected Behavior
Either field would be added to the class and set with the optional parameter, meaning it could be null or undefined or a syntax error is displayed at compile time.
Actual behavior:
Parameter is added as an optional class field resulting in an error.