Update JS-DOC

pull/83/head
MillenniumEarl 2021-03-21 11:36:13 +01:00
parent c153eca68c
commit 8cdc7c718a
1 changed files with 21 additions and 0 deletions

View File

@ -10,15 +10,36 @@ import { POST } from "../constants/css-selector";
//#region Interfaces //#region Interfaces
/**
* Represents an element contained in the post.
*/
export interface IPostElement { export interface IPostElement {
/**
* Type of element.
*/
type: "Generic" | "Text" | "Link" | "Image" | "Spoiler"; type: "Generic" | "Text" | "Link" | "Image" | "Spoiler";
/**
* Name associated with the element.
*/
name: string; name: string;
/**
* Text of the content of the element excluding any children.
*/
text: string; text: string;
/**
* Children elements contained in this element.
*/
content: IPostElement[]; content: IPostElement[];
} }
/**
* Represents a link type link in the post.
*/
export interface ILink extends IPostElement { export interface ILink extends IPostElement {
type: "Image" | "Link"; type: "Image" | "Link";
/**
* Link to the resource.
*/
href: string; href: string;
} }