From 8cdc7c718af98c99259a264b44e5f11f7f7f4c12 Mon Sep 17 00:00:00 2001 From: MillenniumEarl Date: Sun, 21 Mar 2021 11:36:13 +0100 Subject: [PATCH] Update JS-DOC --- src/scripts/scrape-data/post-parse.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/scripts/scrape-data/post-parse.ts b/src/scripts/scrape-data/post-parse.ts index c7218e9..5a2adb8 100644 --- a/src/scripts/scrape-data/post-parse.ts +++ b/src/scripts/scrape-data/post-parse.ts @@ -10,15 +10,36 @@ import { POST } from "../constants/css-selector"; //#region Interfaces +/** + * Represents an element contained in the post. + */ export interface IPostElement { + /** + * Type of element. + */ type: "Generic" | "Text" | "Link" | "Image" | "Spoiler"; + /** + * Name associated with the element. + */ name: string; + /** + * Text of the content of the element excluding any children. + */ text: string; + /** + * Children elements contained in this element. + */ content: IPostElement[]; } +/** + * Represents a link type link in the post. + */ export interface ILink extends IPostElement { type: "Image" | "Link"; + /** + * Link to the resource. + */ href: string; }