()
| 177 | } |
| 178 | |
| 179 | function txClassMethods() { |
| 180 | return [ |
| 181 | ...publicMethods.map(({ name, returns, returnsDesc }) => { |
| 182 | return Object.assign( |
| 183 | j.classMethod( |
| 184 | "method", |
| 185 | j.identifier(name), |
| 186 | [], |
| 187 | j.blockStatement([ |
| 188 | j.returnStatement( |
| 189 | j.callExpression( |
| 190 | j.identifier(`${getInstanceFromComponent}.${name}`), |
| 191 | [] |
| 192 | ) |
| 193 | ), |
| 194 | ]) |
| 195 | ), |
| 196 | { |
| 197 | comments: [ |
| 198 | j.commentBlock( |
| 199 | `*\n * ${returnsDesc}\n * @type ${returns}\n * @public \n `, |
| 200 | true |
| 201 | ), |
| 202 | ], |
| 203 | } |
| 204 | ) |
| 205 | }), |
| 206 | ] |
| 207 | } |
| 208 | |
| 209 | function eventMap() { |
| 210 | return [ |