| 116 | // optional parameters, we'll add a ? to the end of parameter type to |
| 117 | // indicate that it's optional. |
| 118 | const processParam = param => { |
| 119 | let type = param.type; |
| 120 | if (param.optional) { |
| 121 | type += '?'; |
| 122 | } |
| 123 | if (param.rest) { |
| 124 | type = `...${type}[]`; |
| 125 | } |
| 126 | return type; |
| 127 | }; |
| 128 | |
| 129 | // In some cases, even when the arguments are intended to mean different |
| 130 | // things, their types and order are identical. Since the exact meaning |