/** * Provides some assert operations. * Use {@link Validations } for only validations. * @export * @class Assertions * @static */ export default class Assertions { /** * Asserts the given parameter type is Primitive or not. Is not primitive then throw error. * @param o * @static * @throws new Error(`${o} is not primitive type !`) */ static isPrimitive(o: any): void; /** * Asserts the given parameter type is JsonType or not. Is not JsonType then throw error. * @param o * @static * @throws new Error(`${o} is not json type !`) */ static isJsonType(o: any): void; /** * Asserts the given parameter type is NativeType or not. It is not NativeType then throw error. * @param o * @static * @throws new Error(`${o} is not native type !`) */ static isNativeType(o: any): void; /** * Asserts the given parameter type is Object or not. It is not Object then throw error. * @param o * @static * @throws new Error(`${o} type is not Object`) */ static isObject(o: any): void; /** * Asserts the given parameter type is Number or not. It is not Number then throw error. * @param o * @static * @throws new Error(`${o} type is not Number`) */ static isNumber(o: any): void; /** * Asserts the given parameter type is Boolean or not. It is not Boolean then throw error. * @param o * @static * @throws new Error(`${o} type is not Boolean`) */ static isBoolean(o: any): void; /** * Asserts the given parameter type is Array or not. It is not Array then throw error. * @param o * @static * @throws new Error(`${o} type is not Array`) */ static isArray(o: any): void; /** * Asserts the given parameter type is String or not. It is not String then throw error. * @param o * @static * @throws new Error(`${o} type is not String`) */ static isString(o: any): void; /** * Asserts the given parameter type is Date or not. It is not Date then throw error. * @param o * @static * @throws new Error(`${o} type is not Date`) */ static isDate(o: any): void; /** * Asserts the given parameter type is RegExp or not. It is not RegExp then throw error. * @param o * @static * @throws new Error(`${o} type is not RegExp`) */ static isRegExp(o: any): void; /** * Asserts the given parameter type is Null or not. It is notNull then throw error. * @param o * @static * @throws new Error(`${o} type is not Null`) */ static isNull(o: any): void; /** * Asserts the given parameter type is Function or not. It is not Function then throw error. * @param o * @static * @throws new Error(`${o} type is not Function`) */ static isFunction(o: any): void; /** * Asserts the given parameter type is Undefined or not. It is not Undefined then throw error. * @param o * @throws new Error(`${o} type is not undefined`) */ static isUndefined(o: any): void; /** * Asserts the given parameter has value or not. It has not value then throw error. * @param o * @static * @throws new Error(`${o} has not value`) */ static has(o: any): void; /** * Asserts the given parameter has value or not. It has value then throw error. * @param o * @static * @throws new Error(`${o} has value`) */ static hasNot(o: any): void; /** * Asserts the given src parameter equals the given destination parameter or not. if src not equals destination then throw error. * @param src * @param dest * @static * @throws new Error(`${src} is not equals ${dest}`) */ static equals(src: any, dest: any): void; }