File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ export type QwikLoaderEventScope = '-document' | '-window' | '';
77
77
*/
78
78
export const DEBUG_TYPE = 'q:type' ;
79
79
80
- export enum VirtualType {
80
+ export const enum VirtualType {
81
81
Virtual = 'V' ,
82
82
Fragment = 'F' ,
83
83
WrappedSignal = 'S' ,
Original file line number Diff line number Diff line change 11
11
* - It needs to store a function which needs to re-run.
12
12
* - It is `Readonly` because it is computed.
13
13
*/
14
+ import { isDev } from '@qwik.dev/core/build' ;
14
15
import { isDomContainer } from '../client/dom-container' ;
15
16
import type { VNode } from '../client/types' ;
16
17
import { pad , qwikDebugToString } from '../debug' ;
@@ -225,12 +226,16 @@ export class SignalImpl<T = any> implements Signal<T> {
225
226
}
226
227
227
228
toString ( ) {
228
- return (
229
- `[${ this . constructor . name } ${ ( this as any ) . $flags$ & SignalFlags . INVALID ? ' INVALID' : '' } ${ String ( this . $untrackedValue$ ) } ]` +
230
- ( Array . from ( this . $effects$ || [ ] )
231
- . map ( ( e ) => '\n -> ' + pad ( qwikDebugToString ( e [ 0 ] ) , ' ' ) )
232
- . join ( '\n' ) || '' )
233
- ) ;
229
+ if ( isDev ) {
230
+ return (
231
+ `[${ this . constructor . name } ${ ( this as any ) . $flags$ & SignalFlags . INVALID ? ' INVALID' : '' } ${ String ( this . $untrackedValue$ ) } ]` +
232
+ ( Array . from ( this . $effects$ || [ ] )
233
+ . map ( ( e ) => '\n -> ' + pad ( qwikDebugToString ( e [ 0 ] ) , ' ' ) )
234
+ . join ( '\n' ) || '' )
235
+ ) ;
236
+ } else {
237
+ return this . constructor . name ;
238
+ }
234
239
}
235
240
toJSON ( ) {
236
241
return { value : this . $untrackedValue$ } ;
Original file line number Diff line number Diff line change 12
12
"outDir" : " ./dist-dev/tsc-out" ,
13
13
"declarationDir" : " ./dist-dev/dts-out" ,
14
14
"strict" : true ,
15
- "verbatimModuleSyntax" : true ,
16
15
"moduleResolution" : " Bundler" ,
17
16
"baseUrl" : " ." ,
18
17
"assumeChangesOnlyAffectDirectDependencies" : true ,
You can’t perform that action at this time.
0 commit comments