2
2
/* eslint-disable no-restricted-syntax */
3
3
/* eslint-disable @typescript-eslint/no-explicit-any */
4
4
/* eslint-disable max-len */
5
- // import 'core-js';
6
5
/* eslint-disable indent */
7
6
/* eslint-disable brace-style */
8
7
/* eslint-disable comma-dangle */
9
8
/* eslint-disable no-underscore-dangle */
10
9
/* eslint-disable func-names */
11
10
/* eslint-disable no-use-before-define */
12
11
/* eslint-disable no-param-reassign */
12
+ /* eslint-disable-next-line no-mixed-operators */
13
13
14
14
// import typescript types
15
15
import {
16
16
// tree
17
17
Snapshot ,
18
18
// jump, pause
19
19
Mode ,
20
- ComponentData ,
21
20
// array of state and component
22
21
HookStates ,
23
22
// object with tree structure
24
23
Fiber ,
25
24
} from './types/backendTypes' ;
26
25
// import function that creates a tree
27
26
import Tree from './tree' ;
28
- // passes the data down to its components ?
27
+ // passes the data down to its components
29
28
import componentActionsRecord from './masterState' ;
30
29
import routes from './routes' ;
31
30
@@ -43,7 +42,6 @@ declare global {
43
42
let fiberRoot = null ;
44
43
let doWork = true ;
45
44
const circularComponentTable = new Set ( ) ;
46
- let initialstart = false ;
47
45
let rtidCounter = 0 ;
48
46
let rtid = null ;
49
47
@@ -102,20 +100,9 @@ function updateSnapShotTree(snap: Snapshot, mode: Mode): void {
102
100
sendSnapshot ( snap , mode ) ;
103
101
}
104
102
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
-
116
103
/**
117
104
* @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
119
106
* @return An array of array of HookStateItem objects
120
107
*
121
108
* 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
155
142
// react elements throw errors on client side of application - convert react/functions into string
156
143
function convertDataToString ( newObj , oldObj ) {
157
144
const newPropData = oldObj || { } ;
158
- // const newPropData = Array.isArray(obj) === true ? {} : [];
159
145
for ( const key in newObj ) {
160
146
if ( typeof newObj [ key ] === 'function' ) {
161
147
newPropData [ key ] = 'function' ;
@@ -292,7 +278,6 @@ function createTree(
292
278
let newNode = null ;
293
279
294
280
// We want to add this fiber node to the snapshot
295
- // eslint-disable-next-line no-mixed-operators
296
281
if ( componentFound || newState === 'stateless' && ! newState . hooksState ) {
297
282
if (
298
283
currentFiber . child
@@ -359,7 +344,7 @@ function createTree(
359
344
* @return a function to be invoked by index.js that initiates snapshot monitoring
360
345
* linkFiber contains core module functionality, exported as an anonymous function.
361
346
*/
362
- export default ( snap : Snapshot , mode : Mode ) : ( ( ) => void ) => {
347
+ export default ( snap : Snapshot , mode : Mode ) : ( ( ) => void ) => {
363
348
// checks for visiblity of document
364
349
function onVisibilityChange ( ) : void {
365
350
// hidden property = background tab/minimized window
0 commit comments