File tree 5 files changed +5
-7
lines changed
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'
2
2
import { NodePath } from '@babel/traverse'
3
3
4
4
import returnsOrAwaitsPromises from './util/returnsOrAwaitsPromises'
5
- import { isPromiseHandler , isPromiseMethodCall } from './util/predicates'
5
+ import { isPromiseMethodCall } from './util/predicates'
6
6
import findPromiseChains from './util/findPromiseChains'
7
7
import unwindPromiseChain from './util/unwindPromiseChain'
8
8
import finalCleanup from './util/finalCleanup'
Original file line number Diff line number Diff line change 1
1
import * as t from '@babel/types'
2
- import { NodePath } from '@babel/traverse'
3
-
4
2
import { needsAwait } from './predicates'
5
3
6
4
export 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(
48
48
parent . traverse (
49
49
{
50
50
IfStatement : {
51
- enter ( path : NodePath < t . IfStatement > ) {
51
+ enter ( path : NodePath < t . IfStatement > ) : void {
52
52
if ( path . parentPath . isIfStatement ( ) ) return
53
53
ifDepth ++
54
54
const { returning, notReturning } = splitBranches ( path )
@@ -62,7 +62,7 @@ export default function convertConditionalReturns(
62
62
}
63
63
}
64
64
} ,
65
- exit ( path : NodePath < t . IfStatement > ) {
65
+ exit ( path : NodePath < t . IfStatement > ) : void {
66
66
if ( path . parentPath . isIfStatement ( ) ) return
67
67
ifDepth --
68
68
} ,
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export default function finalCleanup(path: NodePath<t.Function>): void {
25
25
path . traverse (
26
26
{
27
27
IfStatement : {
28
- exit ( path : NodePath < t . IfStatement > ) {
28
+ exit ( path : NodePath < t . IfStatement > ) : void {
29
29
const consequent = path . get ( 'consequent' )
30
30
const alternate = path . get ( 'alternate' )
31
31
if ( isEmptyBlock ( consequent ) ) {
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import getFinallyHandler from './getFinallyHandler'
8
8
9
9
function chainLength ( path : NodePath < t . CallExpression > ) : number {
10
10
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
12
12
return length
13
13
}
14
14
You can’t perform that action at this time.
0 commit comments