(members, arrowFunction, name)
| 151282 | return; |
| 151283 | } |
| 151284 | function createArrowFunctionExpressionMember(members, arrowFunction, name) { |
| 151285 | var arrowFunctionBody = arrowFunction.body; |
| 151286 | var bodyBlock; |
| 151287 | // case 1: () => { return [1,2,3] } |
| 151288 | if (arrowFunctionBody.kind === 235 /* SyntaxKind.Block */) { |
| 151289 | bodyBlock = arrowFunctionBody; |
| 151290 | } |
| 151291 | // case 2: () => [1,2,3] |
| 151292 | else { |
| 151293 | bodyBlock = ts.factory.createBlock([ts.factory.createReturnStatement(arrowFunctionBody)]); |
| 151294 | } |
| 151295 | var fullModifiers = ts.concatenate(modifiers, getModifierKindFromSource(arrowFunction, 131 /* SyntaxKind.AsyncKeyword */)); |
| 151296 | var method = ts.factory.createMethodDeclaration(/*decorators*/ undefined, fullModifiers, /*asteriskToken*/ undefined, name, /*questionToken*/ undefined, |
| 151297 | /*typeParameters*/ undefined, arrowFunction.parameters, /*type*/ undefined, bodyBlock); |
| 151298 | ts.copyLeadingComments(assignmentBinaryExpression, method, sourceFile); |
| 151299 | members.push(method); |
| 151300 | } |
| 151301 | } |
| 151302 | } |
| 151303 | function createClassFromVariableDeclaration(node) { |
no test coverage detected