/** * Throws if the provided data is not an array containing exclusively * values of the specified "type" * Returns a clone of the provided array if valid * * @throws * @param {string} attr - tested attribute name * @param {*} data * @return {array} */ export function assertArray(attr: string, data: any, type: any): any[]; /** * Throws if the provided data is not an object or an array. * Returns the unmodified data if validated * * @throws * @param {string} attr - tested attribute name * @param {*} data * @return {object|array} */ export function assertArrayOrObject(attr: string, data: any): object | any[]; /** * Throws if the provided data is not an integer * Returns the unmodified data if validated * * @throws * @param {string} attr - tested attribute name * @param {*} data * @return {number} */ export function assertInteger(attr: string, data: any): number; /** * Throws if the provided data is not an object. * Returns the unmodified data if validated * * @throws * @param {string} attr - tested attribute name * @param {*} data * @return {object} */ export function assertObject(attr: string, data: any): object; /** * Throws if the provided data is not a string * Returns the unmodified data if validated * * @throws * @param {string} attr - tested attribute name * @param {*} data * @return {null|string} */ export function assertString(attr: string, data: any): null | string;