@ngworker/lumberjack
Version:
Lumberjack is a versatile Angular logging library, specifically designed to be extended and customized
34 lines (33 loc) • 1.6 kB
TypeScript
import { provideHttpClient } from '@angular/common/http';
import { EnvironmentProviders } from '@angular/core';
import { LumberjackHttpDriverConfig } from './lumberjack-http-driver.config';
import { LumberjackHttpDriverOptions } from './lumberjack-http-driver.options';
export type LumberjackHttpDriverConfigurationKind = 'options' | 'config';
export type LumberjackHttpDriverConfiguration<Kind extends LumberjackHttpDriverConfigurationKind> = {
kind: Kind;
providers: EnvironmentProviders;
};
export declare function withHttpConfig(config: LumberjackHttpDriverConfig): LumberjackHttpDriverConfiguration<'config'>;
export declare function withHttpOptions(options: LumberjackHttpDriverOptions): LumberjackHttpDriverConfiguration<'options'>;
export type HttpClientFeatures = Parameters<typeof provideHttpClient>;
/**
* Returns the [dependency-injection providers](https://angular.io/guide/glossary#provider)
*
* for the `LumberjackHttpDriver` and its `LumberjackHttpDriverConfig`.
* @usageNotes
*
* The function is useful when you want to bootstrap an application using
* the `bootstrapApplication` function and want to make available the `LumberjackHttpDriver` providers.
*
* ```typescript
* bootstrapApplication(RootComponent, {
* providers: [
* provideLumberjack({...}),
* provideLumberjackHttpDriver({...})
* ]
* });
* ```
*
* @publicApi
*/
export declare function provideLumberjackHttpDriver<Kind extends LumberjackHttpDriverConfigurationKind>(configuration: LumberjackHttpDriverConfiguration<Kind>, ...features: HttpClientFeatures): EnvironmentProviders[];