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
consthex=envalid.makeValidator<Buffer>(value=>Buffer.from(value,'hex'))envalid.cleanEnv({VALUE: 'decafbad',},{VALUE: hex({default: 'ff'}),// TypeScript expects a Buffer or undefined})
However the validator specs infer the validated type and mandate it for the default and devDefault values. That's nice for numbers and booleans but I suspect it'll trip up the json validator. It works for my hex validator above but only because Node.js doesn't throw an error for the unnecessary encoding argument.
Perhaps the default values should always be strings, and be typed as such?