File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,13 @@ import type { Transformer } from "./transform.ts";
9
9
import { matchLast } from "./util.js" ;
10
10
import { RootModule } from "/hooks/module.js" ;
11
11
12
+ type CHUNKS = Record < string , PromiseWithResolvers < void > > ;
13
+
12
14
declare global {
13
15
var __applyTransforms : typeof applyTransforms ;
14
16
var __interceptNavigationControlMessage : typeof interceptNavigationControlMessage ;
15
17
var __onScriptLoaded : ( path : string ) => void ;
16
- var CHUNKS : Record < string , PromiseWithResolvers < void > > ;
18
+ var CHUNKS : CHUNKS ;
17
19
}
18
20
19
21
export const applyTransforms = ( path : string ) => {
@@ -63,8 +65,7 @@ function interceptNavigationControlMessage(e: Event): boolean {
63
65
return true ;
64
66
}
65
67
globalThis . __interceptNavigationControlMessage = interceptNavigationControlMessage ;
66
-
67
- globalThis . CHUNKS = { } ;
68
+ export const CHUNKS : CHUNKS = globalThis . CHUNKS = { } ;
68
69
globalThis . __onScriptLoaded = ( path : string ) => {
69
70
CHUNKS [ path ] ??= Promise . withResolvers ( ) ;
70
71
setTimeout ( CHUNKS [ path ] . resolve ) ;
You can’t perform that action at this time.
0 commit comments