(callee, ...args)
| 147 | * @returns {ESTree.ChainExpression} |
| 148 | */ |
| 149 | export function maybe_call(callee, ...args) { |
| 150 | const expression = /** @type {ESTree.SimpleCallExpression} */ (call(callee, ...args)); |
| 151 | expression.optional = true; |
| 152 | |
| 153 | return { |
| 154 | type: 'ChainExpression', |
| 155 | expression |
| 156 | }; |
| 157 | } |
| 158 | |
| 159 | /** |
| 160 | * @param {ESTree.UnaryOperator} operator |