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
constCounterSymbol=Symbol('CounterSymbol');typeCounter=0|number&{[CounterSymbol]: true};// This manual assertion is correct. Sense of this type is impossibility of misc changes.constintInc=(counter: Counter): Counter=>(counter+1)asCounter;letcounter: Counter=0;counter=3;counter=counter-100;// must be error but no, thus it's the leak in typizationcounter-=100;// must be error but no, thus it's the leak in typizationclassA{protectedcounter: Counter=0;publicinc(): void{this.counter=counter-100;this.counter-=100;// must be error but no, thus it's the leak in typization}}
π Actual behavior
Assignation was allow
π Expected behavior
Assignation was deny
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered:
π Search Terms
incorrect type, incorrect value
π Version & Regression Information
TypeScript version: 5.4.5
β― Playground Link
https://www.typescriptlang.org/play/?#code/MYewdgzgLgBAwiArmKBTATgZQJ4FsBGIANjALww4HEAUA5AsmlnoUbQJQDcAUFNgA6p4SFBjIwADDAA+MMIgJiAZDADeMANoNRzKkQC6ALhhR0iIQF8e3APQ2YAFQAWASwgxcAQ3meSniBAYUC7gMG4woOjoqMBQAHQUqJBCIABmJq7ufIJh7i64-CABLvguRC58MGkebsARTt4A5qgQcdygkLAuKACSYHXk1KCMGMbaTOxjIkxkAHwwQ9NiANQwAIzsMP7CI+jWRKiwwzpTu+IS1scz5ADMPFdi5A-oMAC06xIXMHYeiNAw+CEGHQIBe+EQsDAIAANBk-mEoLQsk4hAdPABrMJgEwCFwAL08wXA7SWL1e5DWn0433suD+sEBMGBoIBELkMLheURyNRqAxWJx-HxhJCYG47SI-ncAEE1NwYDB+CC0LFUAATCKk046c7WBX8RD4cp1brAaiTGAANxALg1qnlCoybjiz3ErvelIuDoVUEyLtJbwpVJpv3+jOZYLZUNhvvhFSRGV5-O6guFRLFCos3AsQA
π» Code
π Actual behavior
Assignation was allow
π Expected behavior
Assignation was deny
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: