(arrowFunc)
| 33 | }; |
| 34 | |
| 35 | export const isNullReturn = (arrowFunc) => { |
| 36 | if (arrowFunc.params.length !== 0) { |
| 37 | return false; |
| 38 | } |
| 39 | |
| 40 | const body = arrowFunc.body; |
| 41 | |
| 42 | if (body.type === 'Literal' && body.value === null) { |
| 43 | return true; |
| 44 | } |
| 45 | |
| 46 | if (body.type === 'Identifier' && body.name === 'null') { |
| 47 | return true; |
| 48 | } |
| 49 | |
| 50 | return false; |
| 51 | }; |
| 52 | |
| 53 | export const isUndefinedReturn = (arrowFunc) => { |
| 54 | if (arrowFunc.params.length !== 0) { |