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
@mhegazy looks like we got our wires crossed. Issue that you mentioned requires showing private/protected properties in a suggestions list, while this one suggests making former properties behave similar to those defined in .ts files:
classMyClass{privateprivateProp='private';}constinstance=newMyClass();// In TS files following error is shown:// "Property 'privateProperty' is private and only accessible within class 'MyClass'"instance.privateProp='new-value';
So, I'd expect that in .js files, an attempt to access properties marked with @private access modifier would raise the same error as in .ts files. Of course, only if --checkJs flag is enabled.
TypeScript Version: 2.8.0-dev.20180217
Search Terms:
Code
Expected behavior:
Following errors should be thrown if
--checkJs
is enabled:Property 'privateProperty' is private and only accessible within class 'MyClass'.
Property 'protectedProperty' is protected and only accessible within class 'MyClass' and its subclasses.
Actual behavior:
@private
and@protected
annotations are being ignored.The text was updated successfully, but these errors were encountered: