input.js 183 B

12345678910
  1. "use strict";
  2. function mandatory(paramName) {
  3. throw new Error(`Missing parameter: ${paramName}`);
  4. }
  5. async function foo({ a, b = mandatory("b") }) {
  6. return Promise.resolve(b);
  7. }