1234567891011121314 |
- "use strict";
- function mandatory(paramName) {
- throw new Error(`Missing parameter: ${paramName}`);
- }
- async function foo({ a, b = mandatory("b") } = {}) {
- return Promise.resolve(b);
- }
- return foo().then(() => {
- throw new Error('should not occcur');
- }, () => true);
|