UNPKG

ngx-markdown

Version:

Angular library that uses marked to parse markdown to html combined with Prism.js for synthax highlights

45 lines (44 loc) 2.48 kB
import { InjectionToken, ModuleWithProviders, Provider, SecurityContext } from '@angular/core'; import { MarkedExtension } from 'marked'; import { CLIPBOARD_OPTIONS } from './clipboard-options'; import { MARKED_EXTENSIONS } from './marked-extensions'; import { MARKED_OPTIONS } from './marked-options'; import { MERMAID_OPTIONS } from './mermaid-options'; import * as i0 from "@angular/core"; import * as i1 from "@angular/common"; import * as i2 from "./clipboard-button.component"; import * as i3 from "./language.pipe"; import * as i4 from "./markdown.component"; import * as i5 from "./markdown.pipe"; type InjectionTokenType<T extends InjectionToken<any>> = T extends InjectionToken<infer R> ? R : unknown; interface TypedValueProvider<T extends InjectionToken<any>> { provide: T; useValue: InjectionTokenType<T>; } interface TypedFactoryProvider<T extends InjectionToken<any>> { provide: T; useFactory: (...args: any[]) => InjectionTokenType<T>; deps?: any[]; } type TypedProvider<T extends InjectionToken<any>> = TypedValueProvider<T> | TypedFactoryProvider<T>; type MultiTypedProvider<T extends InjectionToken<any>> = TypedProvider<T> & { multi: true; }; export declare function isTypedProvider<T extends InjectionToken<any>>(provider: any): provider is TypedProvider<T>; export declare function getMarkedExtensionProvider(markedExtensions: MarkdownModuleConfig['markedExtensions']): Provider[] | undefined; export interface MarkdownModuleConfig { loader?: Provider; clipboardOptions?: TypedProvider<typeof CLIPBOARD_OPTIONS>; markedOptions?: TypedProvider<typeof MARKED_OPTIONS>; markedExtensions?: (MarkedExtension | MultiTypedProvider<typeof MARKED_EXTENSIONS>)[]; mermaidOptions?: TypedProvider<typeof MERMAID_OPTIONS>; sanitize?: SecurityContext; } export declare class MarkdownModule { static forRoot(markdownModuleConfig?: MarkdownModuleConfig): ModuleWithProviders<MarkdownModule>; static forChild(): ModuleWithProviders<MarkdownModule>; static ɵfac: i0.ɵɵFactoryDeclaration<MarkdownModule, never>; 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]>; static ɵinj: i0.ɵɵInjectorDeclaration<MarkdownModule>; } export {};