@@ -3,7 +3,7 @@ import { type InvokeContext, newInvokeContext, invoke } from '../../use/use-core
3
3
import { EMPTY_ARRAY , EMPTY_OBJ } from '../../util/flyweight' ;
4
4
import { logWarn } from '../../util/log' ;
5
5
import { isNotNullable , isPromise , promiseAll , then } from '../../util/promises' ;
6
- import { qDev , seal } from '../../util/qdev' ;
6
+ import { qDev , qInspector , seal } from '../../util/qdev' ;
7
7
import { isArray , isFunction , isObject , isString , type ValueOrPromise } from '../../util/types' ;
8
8
import { domToVnode , smartUpdateChildren } from './visitor' ;
9
9
import { SkipRender } from '../jsx/utils.public' ;
@@ -69,6 +69,7 @@ export class ProcessedJSXNodeImpl implements ProcessedJSXNode {
69
69
$text$ : string = '' ;
70
70
$signal$ : Signal < any > | null = null ;
71
71
$id$ : string ;
72
+ $dev$ : DevJSX | undefined ;
72
73
73
74
constructor (
74
75
public $type$ : string ,
@@ -79,6 +80,9 @@ export class ProcessedJSXNodeImpl implements ProcessedJSXNode {
79
80
public $key$ : string | null
80
81
) {
81
82
this . $id$ = $type$ + ( $key$ ? ':' + $key$ : '' ) ;
83
+ if ( qDev && qInspector ) {
84
+ this . $dev$ = undefined ;
85
+ }
82
86
seal ( this ) ;
83
87
}
84
88
}
@@ -108,17 +112,32 @@ export const processNode = (
108
112
if ( result !== undefined ) {
109
113
convertedChildren = isArray ( result ) ? result : [ result ] ;
110
114
}
111
- return new ProcessedJSXNodeImpl (
115
+ const vnode = new ProcessedJSXNodeImpl (
112
116
textType ,
113
117
props ,
114
118
immutableProps ,
115
119
convertedChildren ,
116
120
flags ,
117
121
key
118
122
) ;
123
+ if ( qDev && qInspector ) {
124
+ vnode . $dev$ = node . dev ;
125
+ }
126
+ return vnode ;
119
127
} ) ;
120
128
} else {
121
- return new ProcessedJSXNodeImpl ( textType , props , immutableProps , convertedChildren , flags , key ) ;
129
+ const vnode = new ProcessedJSXNodeImpl (
130
+ textType ,
131
+ props ,
132
+ immutableProps ,
133
+ convertedChildren ,
134
+ flags ,
135
+ key
136
+ ) ;
137
+ if ( qDev && qInspector ) {
138
+ vnode . $dev$ = node . dev ;
139
+ }
140
+ return vnode ;
122
141
}
123
142
} ;
124
143
0 commit comments