88 is_array ,
99 object_prototype
1010} from '../shared/utils.js' ;
11- import { state as source , set } from './reactivity/sources.js' ;
11+ import { state as source , set , increment } from './reactivity/sources.js' ;
1212import { PROXY_PATH_SYMBOL , STATE_SYMBOL } from '#client/constants' ;
1313import { UNINITIALIZED } from '../../constants.js' ;
1414import * as e from './errors.js' ;
@@ -118,7 +118,7 @@ export function proxy(value) {
118118 if ( prop in target ) {
119119 const s = with_parent ( ( ) => source ( UNINITIALIZED , stack ) ) ;
120120 sources . set ( prop , s ) ;
121- update_version ( version ) ;
121+ increment ( version ) ;
122122
123123 if ( DEV ) {
124124 tag ( s , get_label ( path , prop ) ) ;
@@ -136,7 +136,7 @@ export function proxy(value) {
136136 }
137137 }
138138 set ( s , UNINITIALIZED ) ;
139- update_version ( version ) ;
139+ increment ( version ) ;
140140 }
141141
142142 return true ;
@@ -304,7 +304,7 @@ export function proxy(value) {
304304 }
305305 }
306306
307- update_version ( version ) ;
307+ increment ( version ) ;
308308 }
309309
310310 return true ;
@@ -343,14 +343,6 @@ function get_label(path, prop) {
343343 return / ^ \d + $ / . test ( prop ) ? `${ path } [${ prop } ]` : `${ path } ['${ prop } ']` ;
344344}
345345
346- /**
347- * @param {Source<number> } signal
348- * @param {1 | -1 } [d]
349- */
350- function update_version ( signal , d = 1 ) {
351- set ( signal , signal . v + d ) ;
352- }
353-
354346/**
355347 * @param {any } value
356348 */
0 commit comments