dino-core
Version:
A dependency injection framework for NodeJS applications
37 lines (36 loc) • 1.33 kB
TypeScript
import { type PropertyKey } from '../model/proxies/interceptors/abstract.interceptors';
export declare abstract class ObjectHelper {
/**
* Validate if the provided value is defined, not null and not undefined
* @param {any} value the value to validate
* @returns true if the value is defined, false otherwise
* @public
* @static
*/
static isDefined(value: unknown): boolean;
/**
* Validate if the provided value is not defined, not null and not undefined
* @param {any} value the value to validate
* @returns true if the value is not defined, false otherwise
* @public
* @static
*/
static isNotDefined(value: unknown): boolean;
/**
* Convert a class to plain object
* @param {object} clazz the class to be converted to plain object
* @public
* @static
*/
static classToPlainObject(clazz: any): any;
static isObject(obj: any): boolean;
/**
* Evaluate if an obj is an instance of a type
*
* @param {Any} obj the object to be verified
* @param {Any} type the type the object will be verified against
* @returns {Boolean} true if obj is instance of type, false otherwise
*/
static instanceOf(obj: any, type: any): boolean;
static invoke(obj: any, key: PropertyKey, def?: any): any;
}