import { IType } from "../lang/Type"; import "../prototype"; export interface TypesMapProps { [key: string]: IType; } /** * Provides most used operations on types */ export default class Types { /** * Holds Types * @type {TypesMapProps} */ static Map: TypesMapProps; /** * Holds standard types. */ static readonly ToString: { Array: string; Boolean: string; Date: string; Function: string; Null: string; Number: string; Object: string; RegExp: string; String: string; Undefined: string; }; /** * Gets type name of the given value. * @param o * @return {string} */ static getRawName: (o: any) => string; /** * Gets type name of the given value. * @param o * @return {string} */ static getName: (o: any) => string; /** * Finds @see Type by given object * @param {any} o * @return {IType} provides most used operation on type * @public */ static getType(o: any): IType; /** * Finds @see Type by given name of object * @param {string} name * @return {IType} * @public */ static getTypeByName(name: string): IType; /** * finds @see Type by given name of object * @param {any} o * @param {string[]} ignoreList * @returns {any} */ static getClone(o: T, ignoreList?: string[]): T; /** * gets size of the given value. * @param o * @return {number} */ static getSize(o: any): number; /** * Checks the given src is equals the given dest or not. * @param src * @param dest * @param stack?: any[] * @return {boolean} */ static equals(src: any, dest: any): boolean; /** * Checks value is empty or not by type. * @param o * @return {boolean} */ static hasNot(o: any): boolean; /** * add new types which implements { @see IType } * @param obj * @param type */ static addType(obj: string | T, type: IType): void; }