UNPKG

tsioc

Version:

tsioc is AOP, Ioc container, via typescript decorator

191 lines (190 loc) 4.4 kB
import { Type, AbstractType, Token } from '../types'; /** * check target is function or not. * * @export * @param {*} target * @returns */ export declare function isFunction(target: any): target is Function; /** * check Abstract class with @Abstract or not * * @export * @param {*} target * @returns {target is AbstractType<any>} */ export declare function isAbstractDecoratorClass(target: any): target is AbstractType<any>; /** * check target is class or not. * * @export * @param {*} target * @returns */ export declare function isClass(target: any): target is Type<any>; /** * is run in nodejs or not. * * @export * @returns {boolean} */ export declare function isNodejsEnv(): boolean; /** * check target is token or not. * * @export * @param {*} target * @returns {target is Token<any>} */ export declare function isToken(target: any): target is Token<any>; /** * is target promise or not. * * @export * @param {*} target * @returns {target is Promise<any>} */ export declare function isPromise(target: any): target is Promise<any>; /** * is target rxjs observable or not. * * @export * @param {*} target * @returns {boolean} */ export declare function isObservable(target: any): boolean; /** * is target base object or not. * eg. {}, have not self constructor; * @export * @param {*} target * @returns {target is Promise<any>} */ export declare function isBaseObject(target: any): target is object; /** * is metadata object or not. * * @export * @param {any} target * @param {string[]} [props] * @param {string[]} [extendsProps] * @returns {boolean} */ export declare function isMetadataObject(target: any, props?: string[], extendsProps?: string[]): boolean; /** * check object is class metadata or not. * * @export * @param {any} target * @param {string[]} [extendsProps] * @returns {boolean} */ export declare function isClassMetadata(target: any, extendsProps?: string[]): boolean; /** * check object is param metadata or not. * * @export * @param {any} target * @param {string[]} [extendsProps] * @returns {boolean} */ export declare function isParamMetadata(target: any, extendsProps?: string[]): boolean; /** * check object is param prop metadata or not. * * @export * @param {any} target * @param {string[]} [extendsProps] * @returns {boolean} */ export declare function isParamPropMetadata(target: any, extendsProps?: string[]): boolean; /** * check object is property metadata or not. * * @export * @param {any} target * @param {string[]} [extendsProps] * @returns {boolean} */ export declare function isPropertyMetadata(target: any, extendsProps?: string[]): boolean; /** * check target is string or not. * * @export * @param {*} target * @returns {target is string} */ export declare function isString(target: any): target is string; /** * check target is boolean or not. * * @export * @param {*} target * @returns {target is boolean} */ export declare function isBoolean(target: any): target is boolean; /** * check target is number or not. * * @export * @param {*} target * @returns {target is number} */ export declare function isNumber(target: any): target is number; /** * check target is undefined or not. * * @export * @param {*} target * @returns {target is undefined} */ export declare function isUndefined(target: any): target is undefined; /** * check target is unll or not. * * @export * @param {*} target * @returns {target is null} */ export declare function isNull(target: any): target is null; /** * check target is array or not. * * @export * @param {*} target * @returns {target is Array<any>} */ export declare function isArray(target: any): target is Array<any>; /** * check target is object or not. * * @export * @param {*} target * @returns {target is object} */ export declare function isObject(target: any): target is object; /** * check target is date or not. * * @export * @param {*} target * @returns {target is Date} */ export declare function isDate(target: any): target is Date; /** * check target is symbol or not. * * @export * @param {*} target * @returns {target is Symbol} */ export declare function isSymbol(target: any): target is Symbol; /** * check target is regexp or not. * * @export * @param {*} target * @returns {target is RegExp} */ export declare function isRegExp(target: any): target is RegExp;