UNPKG

2.02 kBTypeScriptView Raw
1import { InjectionToken, ModuleWithProviders, Provider, SecurityContext } from '@angular/core';
2import { MarkedExtension } from 'marked';
3import { CLIPBOARD_OPTIONS } from './clipboard-options';
4import { MARKED_OPTIONS } from './marked-options';
5import { MERMAID_OPTIONS } from './mermaid-options';
6import * as i0 from "@angular/core";
7import * as i1 from "@angular/common";
8import * as i2 from "./clipboard-button.component";
9import * as i3 from "./language.pipe";
10import * as i4 from "./markdown.component";
11import * as i5 from "./markdown.pipe";
12type InjectionTokenType<T extends InjectionToken<any>> = T extends InjectionToken<infer R> ? R : unknown;
13interface TypedValueProvider<T extends InjectionToken<any>> {
14 provide: T;
15 useValue: InjectionTokenType<T>;
16}
17interface TypedFactoryProvider<T extends InjectionToken<any>> {
18 provide: T;
19 useFactory: (...args: any[]) => InjectionTokenType<T>;
20 deps?: any[];
21}
22type TypedProvider<T extends InjectionToken<any>> = TypedValueProvider<T> | TypedFactoryProvider<T>;
23export interface MarkdownModuleConfig {
24 loader?: Provider;
25 clipboardOptions?: TypedProvider<typeof CLIPBOARD_OPTIONS>;
26 markedOptions?: TypedProvider<typeof MARKED_OPTIONS>;
27 markedExtensions?: MarkedExtension[];
28 mermaidOptions?: TypedProvider<typeof MERMAID_OPTIONS>;
29 sanitize?: SecurityContext;
30}
31export declare class MarkdownModule {
32 static forRoot(markdownModuleConfig?: MarkdownModuleConfig): ModuleWithProviders<MarkdownModule>;
33 static forChild(): ModuleWithProviders<MarkdownModule>;
34 static ɵfac: i0.ɵɵFactoryDeclaration<MarkdownModule, never>;
35 static ɵmod: i0.ɵɵNgModuleDeclaration<MarkdownModule, never, [typeof i1.CommonModule, typeof i2.ClipboardButtonComponent, typeof i3.LanguagePipe, typeof i4.MarkdownComponent, typeof i5.MarkdownPipe], [typeof i2.ClipboardButtonComponent, typeof i3.LanguagePipe, typeof i4.MarkdownComponent, typeof i5.MarkdownPipe]>;
36 static ɵinj: i0.ɵɵInjectorDeclaration<MarkdownModule>;
37}
38export {};