(originalBodyStatements, existingPrologue)
| 99268 | return body; |
| 99269 | } |
| 99270 | function findSuperCallAndStatementIndex(originalBodyStatements, existingPrologue) { |
| 99271 | for (var i = existingPrologue.length; i < originalBodyStatements.length; i += 1) { |
| 99272 | var superCall = ts.getSuperCallFromStatement(originalBodyStatements[i]); |
| 99273 | if (superCall) { |
| 99274 | // With a super() call, split the statements into pre-super() and 'body' (post-super()) |
| 99275 | return { |
| 99276 | superCall: superCall, |
| 99277 | superStatementIndex: i, |
| 99278 | }; |
| 99279 | } |
| 99280 | } |
| 99281 | // Since there was no super() call found, consider all statements to be in the main 'body' (post-super()) |
| 99282 | return { |
| 99283 | superStatementIndex: -1, |
| 99284 | }; |
| 99285 | } |
| 99286 | /** |
| 99287 | * We want to try to avoid emitting a return statement in certain cases if a user already returned something. |
| 99288 | * It would generate obviously dead code, so we'll try to make things a little bit prettier |
no outgoing calls
no test coverage detected
searching dependent graphs…