File tree Expand file tree Collapse file tree 5 files changed +5
-7
lines changed Expand file tree Collapse file tree 5 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import * as t from '@babel/types'
22import { NodePath } from '@babel/traverse'
33
44import returnsOrAwaitsPromises from './util/returnsOrAwaitsPromises'
5- import { isPromiseHandler , isPromiseMethodCall } from './util/predicates'
5+ import { isPromiseMethodCall } from './util/predicates'
66import findPromiseChains from './util/findPromiseChains'
77import unwindPromiseChain from './util/unwindPromiseChain'
88import finalCleanup from './util/finalCleanup'
Original file line number Diff line number Diff line change 11import * as t from '@babel/types'
2- import { NodePath } from '@babel/traverse'
3-
42import { needsAwait } from './predicates'
53
64export function awaited < T extends t . Expression > ( node : T ) : t . Expression {
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export default function convertConditionalReturns(
4848 parent . traverse (
4949 {
5050 IfStatement : {
51- enter ( path : NodePath < t . IfStatement > ) {
51+ enter ( path : NodePath < t . IfStatement > ) : void {
5252 if ( path . parentPath . isIfStatement ( ) ) return
5353 ifDepth ++
5454 const { returning, notReturning } = splitBranches ( path )
@@ -62,7 +62,7 @@ export default function convertConditionalReturns(
6262 }
6363 }
6464 } ,
65- exit ( path : NodePath < t . IfStatement > ) {
65+ exit ( path : NodePath < t . IfStatement > ) : void {
6666 if ( path . parentPath . isIfStatement ( ) ) return
6767 ifDepth --
6868 } ,
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export default function finalCleanup(path: NodePath<t.Function>): void {
2525 path . traverse (
2626 {
2727 IfStatement : {
28- exit ( path : NodePath < t . IfStatement > ) {
28+ exit ( path : NodePath < t . IfStatement > ) : void {
2929 const consequent = path . get ( 'consequent' )
3030 const alternate = path . get ( 'alternate' )
3131 if ( isEmptyBlock ( consequent ) ) {
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import getFinallyHandler from './getFinallyHandler'
88
99function chainLength ( path : NodePath < t . CallExpression > ) : number {
1010 let length = 0
11- for ( const link of iterateChain ( path ) ) length ++
11+ for ( const link of iterateChain ( path ) ) length ++ // eslint-disable-line @typescript-eslint/no-unused-vars
1212 return length
1313}
1414
You can’t perform that action at this time.
0 commit comments