Skip to content

Commit

Permalink
Extract reflink type
Browse files Browse the repository at this point in the history
  • Loading branch information
DreierF committed Jul 8, 2023
1 parent fce6be9 commit 5501d92
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/marked.d.ts
Expand Up @@ -251,6 +251,8 @@ declare class _Parser {
parseInline(tokens: Token[], renderer?: _Renderer | _TextRenderer): string;
}

type RefLinks = Record<string, Pick<Tokens.Link | Tokens.Image, 'href' | 'title'>>;

/**
* Tokenizer
*/
Expand All @@ -275,7 +277,7 @@ declare class _Tokenizer {
escape(src: string): Tokens.Escape | undefined;
tag(src: string): Tokens.Tag | undefined;
link(src: string): Tokens.Link | Tokens.Image | undefined;
reflink(src: string, links: Record<string, Pick<Tokens.Link | Tokens.Image, 'href' | 'title'>>): Tokens.Link | Tokens.Image | Tokens.Text | undefined;
reflink(src: string, links: RefLinks): Tokens.Link | Tokens.Image | Tokens.Text | undefined;
emStrong(src: string, maskedSrc: string, prevChar?: string): Tokens.Em | Tokens.Strong | undefined;
codespan(src: string): Tokens.Codespan | undefined;
br(src: string): Tokens.Br | undefined;
Expand Down

0 comments on commit 5501d92

Please sign in to comment.