File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ function Diff(props: DiffProps) {
28
28
}
29
29
30
30
// cleaning preview from stateless data
31
- const statelessCleanning = ( obj :{ name ?:string ; componentData ?:object ; state ?:string | any ; stateSnaphot ?:object ; children ?:any [ ] } ) => {
31
+ const statelessCleanning = ( obj :{ name ?:string ; componentData ?: Record < string , unknown > ; state ?:string | any ; stateSnaphot ?: Record < string , unknown > ; children ?: any [ ] } ) => {
32
32
const newObj = { ...obj } ;
33
33
if ( newObj . name === 'nameless' ) {
34
34
delete newObj . name ;
@@ -45,7 +45,7 @@ function Diff(props: DiffProps) {
45
45
if ( newObj . children ) {
46
46
newObj . children = [ ] ;
47
47
if ( obj . children . length > 0 ) {
48
- obj . children . forEach ( ( element :{ state ?:object | string ; children ?:[ ] } ) => {
48
+ obj . children . forEach ( ( element :{ state ?: Record < string , unknown > | string ; children ?:[ ] } ) => {
49
49
if ( element . state !== 'stateless' || element . children . length > 0 ) {
50
50
const clean = statelessCleanning ( element ) ;
51
51
newObj . children . push ( clean ) ;
You can’t perform that action at this time.
0 commit comments