UNPKG

jc-marked

Version:

Markdown AST (Abstract syntax tree) parser based on finite-state machine (FSM).

24 lines (23 loc) 1.52 kB
declare const isBoolean: (val: unknown) => val is boolean; declare const isString: (val: unknown) => val is string; /**判断是否是数字,不包括字符串等表示的数字 */ declare const isNumber: (val: unknown) => val is number; /**判断一个数字是否是奇数 */ declare const isOddNumber: (val: number) => boolean; /**判断一个数字是否是偶数数 */ declare const isEvenNumber: (val: number) => boolean; declare const isNumberStr: (val: string) => boolean; declare const isInt: (val: unknown) => boolean; declare const isObject: (val: any) => val is Record<any, any>; declare const isArray: (val: any) => val is any[]; declare const isFunction: (val: unknown) => val is Function; declare const isMap: (val: unknown) => val is Map<any, any>; declare const isSet: (val: unknown) => val is Map<any, any>; declare const isRegExp: (val: unknown) => val is RegExp; declare function isPromise<T = any>(val: unknown): val is Promise<T>; interface PromiseLike<T> { then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): PromiseLike<TResult1 | TResult2>; } declare function isPromiseLike<T>(val: any): val is PromiseLike<T>; declare const isUrl: (path: string) => boolean; export { isBoolean, isString, isNumber, isOddNumber, isEvenNumber, isNumberStr, isInt, isObject, isArray, isFunction, isMap, isSet, isRegExp, isPromise, isPromiseLike, isUrl, };