getMessage()function

getMessage(input: unknown): string | undefined
ParamType
inputunknown
The value to read a message from (a string, or an object with a message string). required
Return
string | undefined
The message string, or undefined if none could be found.

Return the string message from an unknown value, or return undefined if it could not be found.