@@ -8,7 +8,7 @@ import type { Options } from './../options';
88import type { ReactElementTreeNode } from './../tree' ;
99
1010const compensateMultilineStringElementIndentation = (
11- element ,
11+ element : any ,
1212 formattedElement : string ,
1313 inline : boolean ,
1414 lvl : number ,
@@ -33,7 +33,7 @@ const compensateMultilineStringElementIndentation = (
3333} ;
3434
3535const formatOneChildren =
36- ( inline : boolean , lvl : number , options : Options ) => ( element ) =>
36+ ( inline : boolean , lvl : number , options : Options ) => ( element : any ) =>
3737 compensateMultilineStringElementIndentation (
3838 element ,
3939 formatTreeNode ( element , inline , lvl , options ) ,
@@ -42,13 +42,15 @@ const formatOneChildren =
4242 options
4343 ) ;
4444
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+ } ;
5254
5355const isInlineAttributeTooLong = (
5456 attributes : string [ ] ,
@@ -117,7 +119,7 @@ export default (
117119 let outInlineAttr = out ;
118120 let outMultilineAttr = out ;
119121 let containsMultilineAttr = false ;
120- const visibleAttributeNames = [ ] ;
122+ const visibleAttributeNames : Array < string > = [ ] ;
121123 const propFilter = createPropFilter ( props , filterProps ) ;
122124 Object . keys ( props )
123125 . filter ( propFilter )
0 commit comments