22/* eslint-disable no-restricted-syntax */
33/* eslint-disable @typescript-eslint/no-explicit-any */
44/* eslint-disable max-len */
5- // import 'core-js';
65/* eslint-disable indent */
76/* eslint-disable brace-style */
87/* eslint-disable comma-dangle */
98/* eslint-disable no-underscore-dangle */
109/* eslint-disable func-names */
1110/* eslint-disable no-use-before-define */
1211/* eslint-disable no-param-reassign */
12+ /* eslint-disable-next-line no-mixed-operators */
1313
1414// import typescript types
1515import {
1616 // tree
1717 Snapshot ,
1818 // jump, pause
1919 Mode ,
20- ComponentData ,
2120 // array of state and component
2221 HookStates ,
2322 // object with tree structure
2423 Fiber ,
2524} from './types/backendTypes' ;
2625// import function that creates a tree
2726import Tree from './tree' ;
28- // passes the data down to its components ?
27+ // passes the data down to its components
2928import componentActionsRecord from './masterState' ;
3029import routes from './routes' ;
3130
@@ -43,7 +42,6 @@ declare global {
4342let fiberRoot = null ;
4443let doWork = true ;
4544const circularComponentTable = new Set ( ) ;
46- let initialstart = false ;
4745let rtidCounter = 0 ;
4846let rtid = null ;
4947
@@ -102,20 +100,9 @@ function updateSnapShotTree(snap: Snapshot, mode: Mode): void {
102100 sendSnapshot ( snap , mode ) ;
103101}
104102
105- // updating tree depending on current mode on the panel (pause, etc)
106- // function sendDevToolsInfo(snap: Snapshot, mode: Mode): void {
107- // window.postMessage(
108- // {
109- // action: 'recordSnap',
110- // payload,
111- // },
112- // '*'
113- // );
114- // }
115-
116103/**
117104 * @method traverseHooks
118- * @param memoizedState memoizedState property on a stateful fctnl component's FiberNode object
105+ * @param memoizedState memoizedState property on a stateful functional component's FiberNode object
119106 * @return An array of array of HookStateItem objects
120107 *
121108 * Helper function to traverse through memoizedState and inject instrumentation to update our state tree
@@ -155,7 +142,6 @@ const exclude = ['alternate', '_owner', '_store', 'get key', 'ref', '_self', '_s
155142// react elements throw errors on client side of application - convert react/functions into string
156143function convertDataToString ( newObj , oldObj ) {
157144 const newPropData = oldObj || { } ;
158- // const newPropData = Array.isArray(obj) === true ? {} : [];
159145 for ( const key in newObj ) {
160146 if ( typeof newObj [ key ] === 'function' ) {
161147 newPropData [ key ] = 'function' ;
@@ -292,7 +278,6 @@ function createTree(
292278 let newNode = null ;
293279
294280 // We want to add this fiber node to the snapshot
295- // eslint-disable-next-line no-mixed-operators
296281 if ( componentFound || newState === 'stateless' && ! newState . hooksState ) {
297282 if (
298283 currentFiber . child
@@ -359,7 +344,7 @@ function createTree(
359344 * @return a function to be invoked by index.js that initiates snapshot monitoring
360345 * linkFiber contains core module functionality, exported as an anonymous function.
361346 */
362- export default ( snap : Snapshot , mode : Mode ) : ( ( ) => void ) => {
347+ export default ( snap : Snapshot , mode : Mode ) : ( ( ) => void ) => {
363348 // checks for visiblity of document
364349 function onVisibilityChange ( ) : void {
365350 // hidden property = background tab/minimized window
0 commit comments