Update JS-DOC
parent
c153eca68c
commit
8cdc7c718a
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue