A function that receives a defaultValue and returns a new function that receives a value.
If the value is null, or undefined, the defaultValue is returned, otherwise the value is returned.
defaultTo<R>(defaultValue): (<T>(value?: T) => T extends NonNullable<T> ? T<T> : NonNullable<T> extends never ? R : R | T)
A function that receives a defaultValue and returns a new function that receives a value. If the value is null, or undefined, the defaultValue is returned, otherwise the value is returned.