Options
All
  • Public
  • Public/Protected
  • All
Menu

@21epub/dynamic-loader

Index

Type aliases

ExtractArrayItem

ExtractArrayItem<S, U>: S extends infer P[] ? P : U

Type parameters

  • S

  • U

ExtractModule

ExtractModule<T>: T extends { loader: infer P; modules: any } ? P : () => Promise<any>

Type parameters

  • T

ExtractPromise

ExtractPromise<T>: T extends Promise<infer P> ? P : any

Type parameters

  • T

LoadedLoader

LoadedLoader: { callback: ReturnType<PromiseFn<any>>; loader: () => Promise<any> }

Type declaration

  • callback: ReturnType<PromiseFn<any>>
  • loader: () => Promise<any>
      • (): Promise<any>
      • Returns Promise<any>

LoaderModuleParms

LoaderModuleParms<S>: { loader: ExtractModule<ModuleArrayItem<S>> | PromiseFn<any>; modules: string[] | string }

Type parameters

  • S

Type declaration

LoaderModules

LoaderModules<S>: {}

Type parameters

  • S

Type declaration

ModuleArrayItem

ModuleArrayItem<S>: ExtractArrayItem<S, ModuleParam>

Type parameters

  • S

ModuleParam

ModuleParam: { loader: PromiseFn<any>; modules: string | string[] }

Type declaration

  • loader: PromiseFn<any>
  • modules: string | string[]

PromiseFn

PromiseFn<T>: () => Promise<T>

Type parameters

  • T

Type declaration

    • (): Promise<T>
    • Returns Promise<T>

Variables

Const pMap

pMap: any = require('p-map')

Functions

Const Demo1

  • Demo1(props: Props): Element
  • Demo1(props: Props): Element

Const Demo3

  • Demo3(props: Props): Element

Generated using TypeDoc