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
Often we have to check variables for empty values.
If variables has undefined or null types we check for that types.
But if we want to refactor our code, and replace nullable variables to always with value, we init its with empty values like false, 0, -1, ""
But checks that variables for null or undefined in other parts of program are still there, and make a lot of bugs
leta: string|undefined;if(a!==undefined){foo(a);}// and if we refactorleta='';// In this check we potentially has a bug, cause undefined is not possible here, if(a!==undefined){foo(a);}
The text was updated successfully, but these errors were encountered:
cevek
changed the title
Need a flag to suppress checks for null or undefined
Need a flag to throw an error if the checks expression for null or undefined has not that types
Mar 24, 2017
cevek
changed the title
Need a flag to throw an error if the checks expression for null or undefined has not that types
Need a flag to check if checking an expression for null or undefined has not that types
Mar 24, 2017
Often we have to check variables for empty values.
If variables has
undefined
ornull
types we check for that types.But if we want to refactor our code, and replace nullable variables to always with value, we init its with empty values like
false, 0, -1, ""
But checks that variables for null or undefined in other parts of program are still there, and make a lot of bugs
The text was updated successfully, but these errors were encountered: