File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ export interface ComponentEntry {
2+ title ?: string ;
3+ owner ?: string ;
4+ noCSS ?: boolean ;
5+ alias ?: string | readonly string [ ] ;
6+ aliasTitles ?: Readonly < Record < string , string > > ;
7+
8+ optional ?: string | readonly string [ ] ;
9+ require ?: string | readonly string [ ] ;
10+ modify ?: string | readonly string [ ] ;
11+ }
12+
13+ export type ComponentCategory = Record < string , string | Readonly < ComponentEntry > > ;
14+
15+ export type Components = Record < string , Readonly < ComponentCategory > > ;
16+
17+ export interface LoadChainer < T > {
18+ series : ( before : T , after : ( ) => T ) => T ;
19+ parallel : ( values : readonly T [ ] ) => T ;
20+ }
21+
22+ export type LoadFunction = < T > ( loadComponent : ( id : string ) => T , chainer ?: Readonly < LoadChainer < T > > ) => T ;
23+
24+ export interface Loader {
25+ getIds : ( ) => string [ ] ;
26+ load : LoadFunction ;
27+ }
28+
29+ function getLoader (
30+ components : Readonly < Components > ,
31+ load : readonly string [ ] ,
32+ loaded ?: readonly string [ ] ,
33+ ) : Loader ;
34+
35+ export = getLoader ;
You can’t perform that action at this time.
0 commit comments