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
I am able to access the item property without the typescript throwing any errors. This property is a private property so typescript is supposed to throw an error like Property 'item' is private and only accessible within class 'Demo'.
π Expected behavior
The typescript should throw an error Property 'item' is private and only accessible within class 'Demo'.
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered:
π Search Terms
private properties public access, private properties
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?target=99&jsx=0&ts=3.3.3#code/MYGwhgzhAEAiCmBbA9tA3gKGtADgJwEsA3MAF3mgPMWgF5oByfYs+Bgbi2gjERxAr0AjJwC+GDMGQA7CKWgATJKnrT4AdzjKAFAEpOU2cgEA6EMgDm2pSgDaDKkgYBdXRhvITjxEA
π» Code
π Actual behavior
I am able to access the
item
property without the typescript throwing any errors. This property is a private property so typescript is supposed to throw an error likeProperty 'item' is private and only accessible within class 'Demo'.
π Expected behavior
The typescript should throw an error
Property 'item' is private and only accessible within class 'Demo'.
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: