@@ -83,16 +83,16 @@ function detectMutations(
8383
8484 // Gather all keys from prev (tracked) and after objs
8585 const keysToDetect : Record < string , boolean > = { }
86- for ( let key in trackedProperty . children ) {
86+ for ( const key in trackedProperty . children ) {
8787 keysToDetect [ key ] = true
8888 }
89- for ( let key in obj ) {
89+ for ( const key in obj ) {
9090 keysToDetect [ key ] = true
9191 }
9292
9393 const hasIgnoredPaths = ignoredPaths . length > 0
9494
95- for ( let key in keysToDetect ) {
95+ for ( const key in keysToDetect ) {
9696 const nestedPath = path ? path + '.' + key : key
9797
9898 if ( hasIgnoredPaths ) {
@@ -176,7 +176,7 @@ export function createImmutableStateInvariantMiddleware(
176176 serializer ?: EntryProcessor ,
177177 decycler ?: EntryProcessor ,
178178 ) : EntryProcessor {
179- let stack : any [ ] = [ ] ,
179+ const stack : any [ ] = [ ] ,
180180 keys : any [ ] = [ ]
181181
182182 if ( ! decycler )
@@ -189,7 +189,7 @@ export function createImmutableStateInvariantMiddleware(
189189
190190 return function ( this : any , key : string , value : any ) {
191191 if ( stack . length > 0 ) {
192- var thisPos = stack . indexOf ( this )
192+ const thisPos = stack . indexOf ( this )
193193 ~ thisPos ? stack . splice ( thisPos + 1 ) : stack . push ( this )
194194 ~ thisPos ? keys . splice ( thisPos , Infinity , key ) : keys . push ( key )
195195 if ( ~ stack . indexOf ( value ) ) value = decycler ! . call ( this , key , value )
@@ -199,7 +199,7 @@ export function createImmutableStateInvariantMiddleware(
199199 }
200200 }
201201
202- let {
202+ const {
203203 isImmutable = isImmutableDefault ,
204204 ignoredPaths,
205205 warnAfter = 32 ,
0 commit comments