@@ -16,16 +16,24 @@ import { Transition } from "./util/transition.js";
16
16
// @deno -types="./util/fetch.ts"
17
17
import { fetchJson } from "./util/fetch.js" ;
18
18
19
- // @deno -types="./util.ts"
20
- import { proxy } from "./util.js" ;
19
+ // @deno -types="./util/proxy .ts"
20
+ import { proxy } from "./util/proxy .js" ;
21
21
// @deno -types="./protocol.ts"
22
22
import { ModuleManager } from "./protocol.js" ;
23
23
// @deno -types="./static.ts"
24
24
import { SPOTIFY_VERSION } from "./static.js" ;
25
25
// @deno -types="./transform.ts"
26
- import { createTransformer } from "./transform.js" ;
26
+ import { createTransformer , type Transformer } from "./transform.js" ;
27
27
28
+ export type IndexMixinFn = ( transformer : Transformer ) => void ;
29
+ export type IndexPreloadFn = ( module : ModuleInstance ) => Promise < ( ) => void > ;
30
+ export type IndexLoadFn = ( module : ModuleInstance ) => Promise < ( ) => void > ;
28
31
32
+ export type JSIndex = {
33
+ mixin ?: IndexMixinFn ;
34
+ preload ?: IndexPreloadFn ;
35
+ load ?: IndexLoadFn ;
36
+ } ;
29
37
30
38
export type ModuleIdentifier = string ;
31
39
export type Version = string ;
@@ -423,7 +431,7 @@ export class ModuleInstance extends ModuleInstanceBase<Module>
423
431
_unloadCss : ( ( ) => void ) | null = null ;
424
432
private mixinsLoaded = false ;
425
433
private loaded = false ;
426
- private jsIndex : any ;
434
+ private jsIndex : JSIndex | null = null ;
427
435
428
436
public transition = new Transition ( ) ;
429
437
private dependants = new Set < ModuleInstance > ( ) ;
0 commit comments