UNPKG

typeinit

Version:

An Intuitive Javascript Typing Animation Library

40 lines (39 loc) 1.49 kB
import { VisibleOptionsType, VisibleOptionsTypeCombine } from "./types"; /** * Creates a new HTML element * @param {string} type the type of HTML element to create * @param {string} textContent the text to put in the new HTML element * @returns {Object} newly created HTML element * @private */ export declare function createEl(type: string, textContent: string): HTMLElement; /** * Returns the last child of an element excluding the caret element * @param {Object} el the parent * @param {boolean} [caret=false] if true, get the second to last child * @returns {Object} HTML element * @private */ export declare function getLastChild(el: HTMLElement, caret?: boolean): Element; /** * Waits until an element becomes visible * @param {Object} el the parent * @param {string} waitTill configure when the element becomes visible * @returns {Promise<void>} * @private */ export declare function waitUntilVisibleFunc(el: HTMLElement, waitTill: VisibleOptionsType | VisibleOptionsTypeCombine, controller: AbortController): Promise<void>; /** * Gets the CSS display value of an element * @param {Object} el the element to get the display from * @returns {string} the display value of the element * @private */ export declare function getDefaultDisplay(el: HTMLElement): string; /** * Returns true if the argument is a number * @param {*} num value to check * @returns {boolean} true or false * @private */ export declare function isNumber(num: any): num is number;