import { TokenType, TokensType } from '../model'; export const enum InlineTag { Text, Link, Image, Strong, Em, Code, Math, Del, Br, Abbrev, Footnote, } export const enum InlineOrder { Escape, AutoLink, Url, Footnote, Link, RefLink, NoLink, Abbrev, Strong, Em, Code, Math, Del, Br, Text, } export interface InlineLink { [InlineTag.Link]: { l: string; t?: string; } & InlinePhrase; } export interface InlineImage { [InlineTag.Image]: { l: string; t?: string; _: string; }; } export interface InlineStrong { [InlineTag.Strong]: InlinePhrase; } export interface InlineEm { [InlineTag.Em]: InlinePhrase; } export interface InlineDel { [InlineTag.Del]: InlinePhrase; } export interface InlineBr { [InlineTag.Br]: {}; } export interface InlineCode { [InlineTag.Code]: { _: string; }; } export interface InlineMath { [InlineTag.Math]: { _: string; }; } export interface InlineAbbrev { [InlineTag.Abbrev]: { t?: string; _: string; }; } export interface InlineFootnote { [InlineTag.Footnote]: { l: string; // link }; } export interface InlinePhrase { _: TokensType; } export interface InlineText { [InlineTag.Text]: { _: string; }; } export interface InlineTokenMap extends InlineLink, InlineImage, InlineStrong, InlineEm, InlineDel, InlineCode, InlineAbbrev, InlineBr, InlineText { } // Basics export interface BasicInlineTokenMap extends InlineTokenMap { } export type BasicInlineToken = TokenType;