UNPKG

assertior

Version:

Assertion library with soft assertions

32 lines (31 loc) 1.35 kB
declare type expectedArg = 'object' | 'array' | 'set' | 'function' | 'asyncFunction' | 'promise' | 'null' | 'string' | 'undefined' | 'symbol' | 'number' | 'boolean'; declare const typesEnum: { object: string; array: string; set: string; function: string; asyncFunction: string; promise: string; null: string; string: string; undefined: string; symbol: string; number: string; boolean: string; }; declare function isPrimitive(arg: any): boolean; declare function getType(arg: any): any; declare function isObject(arg: any): boolean; declare function isArray(arg: any): boolean; declare function isNull(arg: any): boolean; declare function isString(arg: any): boolean; declare function isUndefined(arg: any): boolean; declare function isSet(arg: any): boolean; declare function isSymbol(arg: any): boolean; declare function isNumber(arg: any): boolean; declare function isBoolean(arg: any): boolean; declare function isFunction(arg: any): boolean; declare function isAsyncFunction(arg: any): boolean; declare function isPromise(arg: any): boolean; declare function isType(arg: any, typeArg: expectedArg): boolean; export { isArray, isObject, isNull, isString, isSet, isUndefined, isNumber, isPromise, isBoolean, isSymbol, isFunction, isAsyncFunction, typesEnum, expectedArg, isType, getType, isPrimitive };