@@ -22,13 +22,13 @@ import { UNINITIALIZED } from '../../constants.js';
2222 * @param {T } value
2323 * @param {boolean } [immutable]
2424 * @param {Set<Function> | null } [owners]
25- * @returns {import('./types.js ').ProxyStateObject<T> | T }
25+ * @returns {import('#client ').ProxyStateObject<T> | T }
2626 */
2727export function proxy ( value , immutable = true , owners ) {
2828 if ( typeof value === 'object' && value != null && ! is_frozen ( value ) ) {
2929 // If we have an existing proxy, return it...
3030 if ( STATE_SYMBOL in value ) {
31- const metadata = /** @type {import('./types.js ').ProxyMetadata<T> } */ ( value [ STATE_SYMBOL ] ) ;
31+ const metadata = /** @type {import('#client ').ProxyMetadata<T> } */ ( value [ STATE_SYMBOL ] ) ;
3232 // ...unless the proxy belonged to a different object, because
3333 // someone copied the state symbol using `Reflect.ownKeys(...)`
3434 if ( metadata . t === value || metadata . p === value ) {
@@ -53,7 +53,7 @@ export function proxy(value, immutable = true, owners) {
5353 const proxy = new Proxy ( value , state_proxy_handler ) ;
5454
5555 define_property ( value , STATE_SYMBOL , {
56- value : /** @type {import('./types.js ').ProxyMetadata } */ ( {
56+ value : /** @type {import('#client ').ProxyMetadata } */ ( {
5757 s : new Map ( ) ,
5858 v : source ( 0 ) ,
5959 a : is_array ( value ) ,
@@ -86,7 +86,7 @@ export function proxy(value, immutable = true, owners) {
8686}
8787
8888/**
89- * @template {import('./types.js ').ProxyStateObject} T
89+ * @template {import('#client ').ProxyStateObject} T
9090 * @param {T } value
9191 * @param {Map<T, Record<string | symbol, any>> } already_unwrapped
9292 * @returns {Record<string | symbol, any> }
@@ -138,23 +138,23 @@ function unwrap(value, already_unwrapped) {
138138 */
139139export function unstate ( value ) {
140140 return /** @type {T } */ (
141- unwrap ( /** @type {import('./types.js ').ProxyStateObject } */ ( value ) , new Map ( ) )
141+ unwrap ( /** @type {import('#client ').ProxyStateObject } */ ( value ) , new Map ( ) )
142142 ) ;
143143}
144144
145145/**
146- * @param {import('./types.js ').Source<number> } signal
146+ * @param {import('#client ').Source<number> } signal
147147 * @param {1 | -1 } [d]
148148 */
149149function update_version ( signal , d = 1 ) {
150150 set ( signal , signal . v + d ) ;
151151}
152152
153- /** @type {ProxyHandler<import('./types.js ').ProxyStateObject<any>> } */
153+ /** @type {ProxyHandler<import('#client ').ProxyStateObject<any>> } */
154154const state_proxy_handler = {
155155 defineProperty ( target , prop , descriptor ) {
156156 if ( descriptor . value ) {
157- /** @type {import('./types.js ').ProxyMetadata } */
157+ /** @type {import('#client ').ProxyMetadata } */
158158 const metadata = target [ STATE_SYMBOL ] ;
159159
160160 const s = metadata . s . get ( prop ) ;
@@ -165,7 +165,7 @@ const state_proxy_handler = {
165165 } ,
166166
167167 deleteProperty ( target , prop ) {
168- /** @type {import('./types.js ').ProxyMetadata } */
168+ /** @type {import('#client ').ProxyMetadata } */
169169 const metadata = target [ STATE_SYMBOL ] ;
170170 const s = metadata . s . get ( prop ) ;
171171 const is_array = metadata . a ;
@@ -198,7 +198,7 @@ const state_proxy_handler = {
198198 return Reflect . get ( target , STATE_SYMBOL ) ;
199199 }
200200
201- /** @type {import('./types.js ').ProxyMetadata } */
201+ /** @type {import('#client ').ProxyMetadata } */
202202 const metadata = target [ STATE_SYMBOL ] ;
203203 let s = metadata . s . get ( prop ) ;
204204
@@ -229,7 +229,7 @@ const state_proxy_handler = {
229229 getOwnPropertyDescriptor ( target , prop ) {
230230 const descriptor = Reflect . getOwnPropertyDescriptor ( target , prop ) ;
231231 if ( descriptor && 'value' in descriptor ) {
232- /** @type {import('./types.js ').ProxyMetadata } */
232+ /** @type {import('#client ').ProxyMetadata } */
233233 const metadata = target [ STATE_SYMBOL ] ;
234234 const s = metadata . s . get ( prop ) ;
235235
@@ -245,7 +245,7 @@ const state_proxy_handler = {
245245 if ( prop === STATE_SYMBOL ) {
246246 return true ;
247247 }
248- /** @type {import('./types.js ').ProxyMetadata } */
248+ /** @type {import('#client ').ProxyMetadata } */
249249 const metadata = target [ STATE_SYMBOL ] ;
250250 const has = Reflect . has ( target , prop ) ;
251251
@@ -266,7 +266,7 @@ const state_proxy_handler = {
266266 } ,
267267
268268 set ( target , prop , value , receiver ) {
269- /** @type {import('./types.js ').ProxyMetadata } */
269+ /** @type {import('#client ').ProxyMetadata } */
270270 const metadata = target [ STATE_SYMBOL ] ;
271271 let s = metadata . s . get ( prop ) ;
272272 // If we haven't yet created a source for this property, we need to ensure
@@ -329,7 +329,7 @@ const state_proxy_handler = {
329329 } ,
330330
331331 ownKeys ( target ) {
332- /** @type {import('./types.js ').ProxyMetadata } */
332+ /** @type {import('#client ').ProxyMetadata } */
333333 const metadata = target [ STATE_SYMBOL ] ;
334334
335335 get ( metadata . v ) ;
0 commit comments