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
Sometime we need a value readonly from outside, but writable of cause inside. Usually we do it by double properties, but that's superfluous and waste of performance.
We do all things above to make sure the value could only write from inside, otherwise, there will be a TS warn. If we want to save performance (ignore the superfluous problem being worse):
Search Terms
Suggestion
Sometime we need a value readonly from outside, but writable of cause inside. Usually we do it by double properties, but that's superfluous and waste of performance.
Use Cases
We do all things above to make sure the value could only write from inside, otherwise, there will be a TS warn. If we want to save performance (ignore the superfluous problem being worse):
Examples
One solution (everyone can suggest a better one of cause, I mainly point out the need):
Checklist
My suggestion meets these guidelines:
The text was updated successfully, but these errors were encountered: