@@ -8,7 +8,7 @@ import type { Options } from './../options';
8
8
import type { ReactElementTreeNode } from './../tree' ;
9
9
10
10
const compensateMultilineStringElementIndentation = (
11
- element ,
11
+ element : any ,
12
12
formattedElement : string ,
13
13
inline : boolean ,
14
14
lvl : number ,
@@ -33,7 +33,7 @@ const compensateMultilineStringElementIndentation = (
33
33
} ;
34
34
35
35
const formatOneChildren =
36
- ( inline : boolean , lvl : number , options : Options ) => ( element ) =>
36
+ ( inline : boolean , lvl : number , options : Options ) => ( element : any ) =>
37
37
compensateMultilineStringElementIndentation (
38
38
element ,
39
39
formatTreeNode ( element , inline , lvl , options ) ,
@@ -42,13 +42,15 @@ const formatOneChildren =
42
42
options
43
43
) ;
44
44
45
- const onlyPropsWithOriginalValue = ( defaultProps , props ) => ( propName ) => {
46
- const haveDefaultValue = Object . keys ( defaultProps ) . includes ( propName ) ;
47
- return (
48
- ! haveDefaultValue ||
49
- ( haveDefaultValue && defaultProps [ propName ] !== props [ propName ] )
50
- ) ;
51
- } ;
45
+ const onlyPropsWithOriginalValue =
46
+ ( defaultProps : Record < string , any > , props : Record < string , any > ) =>
47
+ ( propName : string ) => {
48
+ const haveDefaultValue = Object . keys ( defaultProps ) . includes ( propName ) ;
49
+ return (
50
+ ! haveDefaultValue ||
51
+ ( haveDefaultValue && defaultProps [ propName ] !== props [ propName ] )
52
+ ) ;
53
+ } ;
52
54
53
55
const isInlineAttributeTooLong = (
54
56
attributes : string [ ] ,
@@ -117,7 +119,7 @@ export default (
117
119
let outInlineAttr = out ;
118
120
let outMultilineAttr = out ;
119
121
let containsMultilineAttr = false ;
120
- const visibleAttributeNames = [ ] ;
122
+ const visibleAttributeNames : Array < string > = [ ] ;
121
123
const propFilter = createPropFilter ( props , filterProps ) ;
122
124
Object . keys ( props )
123
125
. filter ( propFilter )
0 commit comments