mta-wiki-parser
Version:
Wiki to Discord parser for Multi Theft Auto Wiki: https://wiki.multitheftauto.com/
36 lines (35 loc) • 963 B
TypeScript
import { IFetchedArticle } from './fetch';
export interface IParsedArticle {
type: ParsedArticleType;
id: number;
url: string;
title: string;
categories: string[];
sections: IParsedSection[];
image: string | false;
}
export interface IParsedSection {
title: string;
paragraphs: IParsedParagraph[];
}
export interface IParsedParagraph {
title: string | false;
type: ParsedParagraphType;
text: string;
}
export declare enum ParsedParagraphType {
Codeblock = "Codeblock",
Text = "Text"
}
export declare enum ParsedArticleType {
SharedFunction = "Shared Function",
ClientFunction = "Client Function",
ServerFunction = "Server Function",
ClientEvent = "Client Event",
ServerEvent = "Server Event",
UsefulFunction = "Useful Function",
GenericPage = "Page"
}
export declare class Parser {
static parse(article: IFetchedArticle): IParsedArticle;
}