wiki.d.ts 686 B

123456789101112131415161718192021
  1. export type OutputDestination = DocumentFragment | HTMLElement | JQuery;
  2. export interface WikifierOptions {
  3. ignoreTerminatorCase?: boolean | undefined;
  4. profile: string;
  5. }
  6. export interface WikifierAPI {
  7. new(destination: OutputDestination | null, source: string, options?: WikifierOptions): unknown;
  8. createExternalLink(destination: OutputDestination, url: string, text: string): HTMLAnchorElement;
  9. createInternalLink(
  10. destination: OutputDestination,
  11. passage: string,
  12. text: string,
  13. callback: () => void,
  14. ): HTMLAnchorElement;
  15. isExternalLink(link: string): boolean;
  16. wikifyEval(text: string): DocumentFragment;
  17. }
  18. export {};