@@ -41,14 +41,14 @@ export function createStorage<T extends StorageValue>(
41
41
return {
42
42
base,
43
43
relativeKey : key . slice ( base . length ) ,
44
- driver : context . mounts [ base ] ,
44
+ driver : context . mounts [ base ] ! ,
45
45
} ;
46
46
}
47
47
}
48
48
return {
49
49
base : "" ,
50
50
relativeKey : key ,
51
- driver : context . mounts [ "" ] ,
51
+ driver : context . mounts [ "" ] ! ,
52
52
} ;
53
53
} ;
54
54
@@ -65,7 +65,7 @@ export function createStorage<T extends StorageValue>(
65
65
? base ! . slice ( mountpoint . length )
66
66
: undefined ,
67
67
mountpoint,
68
- driver : context . mounts [ mountpoint ] ,
68
+ driver : context . mounts [ mountpoint ] ! ,
69
69
} ) ) ;
70
70
} ;
71
71
@@ -86,7 +86,7 @@ export function createStorage<T extends StorageValue>(
86
86
context . watching = true ;
87
87
for ( const mountpoint in context . mounts ) {
88
88
context . unwatch [ mountpoint ] = await watch (
89
- context . mounts [ mountpoint ] ,
89
+ context . mounts [ mountpoint ] ! ,
90
90
onChange ,
91
91
mountpoint
92
92
) ;
@@ -98,7 +98,7 @@ export function createStorage<T extends StorageValue>(
98
98
return ;
99
99
}
100
100
for ( const mountpoint in context . unwatch ) {
101
- await context . unwatch [ mountpoint ] ( ) ;
101
+ await context . unwatch [ mountpoint ] ! ( ) ;
102
102
}
103
103
context . unwatch = { } ;
104
104
context . watching = false ;
@@ -426,11 +426,11 @@ export function createStorage<T extends StorageValue>(
426
426
return ;
427
427
}
428
428
if ( context . watching && base in context . unwatch ) {
429
- context . unwatch [ base ] ( ) ;
429
+ context . unwatch [ base ] ?. ( ) ;
430
430
delete context . unwatch [ base ] ;
431
431
}
432
432
if ( _dispose ) {
433
- await dispose ( context . mounts [ base ] ) ;
433
+ await dispose ( context . mounts [ base ] ! ) ;
434
434
}
435
435
context . mountpoints = context . mountpoints . filter ( ( key ) => key !== base ) ;
436
436
delete context . mounts [ base ] ;
0 commit comments