ngx-fastboot
Version:
ngx-fastboot is an Angular library designed to dynamically load configuration settings at runtime, optimizing application startup performance by offloading configurations to a separate compilation chunk.
23 lines (15 loc) • 599 B
text/typescript
import {
ApplicationConfig,
EnvironmentProviders,
Provider,
Type,
} from '@angular/core';
export type LazyModule<T> = () => Promise<T | { default: T }>;
export type AngularProvider = Provider | EnvironmentProviders;
export type LazyProvider = LazyModule<AngularProvider | Array<AngularProvider>>;
export type LazyComponent = LazyModule<Type<unknown>>;
export type FastProvider = AngularProvider | LazyProvider;
export type FastComponent = Type<unknown> | LazyComponent;
export type FastApplicationConfig = Omit<ApplicationConfig, 'providers'> & {
providers: Array<FastProvider>;
};