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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* This function is used to check nullish state of a value passed to it. Nullish means the value being either `null` or `undefined`. If the value is found to be nullish, the function returns the boolean `false`, else it returns the boolean `true`.
* @example
* Here's an example:-
* function print(str: string | null) \{
* if(isNotNullish(str)) \{
* console.log(`the string is ${str}`)
* \} else \{
* console.log(`the string is null`)
* \}
* \}
*/
exportfunctionisNotNullish<T0>(value: T0|undefined|null): value is T0{