Home > @skunkteam/types > CustomMessage
The type for optional custom messages
Signature:
type CustomMessage<T, E = void> = undefined | string | ((got: string, input: T, explanation: E) => string);
-
When of type
string
, the custom message will be:${customMessage}, got: ${got}
-
When of type
function
, it will receive thegot
part to use inside the message.