mandatory = () => { throw new Error('Missing parameter!'); } foo = (bar = mandatory()) => { return bar; } foo(1);
console.log('test');