@base-framework/base
Version:
This is a javascript framework.
53 lines (52 loc) • 1.43 kB
TypeScript
/**
* Types
*
* Utility class for working with variable types.
*
* @module
* @name Types
*/
export class Types {
/**
* Gets the type of a variable.
*
* @param {*} data - The data whose type is to be determined.
* @returns {string} The type of the variable ('undefined', 'object', 'function', 'array', etc.).
*/
static getType(data: any): string;
/**
* Checks if a value is undefined.
*
* @param {*} data - The data to check.
* @returns {boolean} True if the data is undefined.
*/
static isUndefined(data: any): boolean;
/**
* Checks if a value is an object (excluding arrays).
*
* @param {*} data - The data to check.
* @returns {boolean} True if the data is a plain object.
*/
static isObject(data: any): boolean;
/**
* Checks if a value is a function.
*
* @param {*} data - The data to check.
* @returns {boolean} True if the data is a function.
*/
static isFunction(data: any): boolean;
/**
* Checks if a value is a string.
*
* @param {*} data - The data to check.
* @returns {boolean} True if the data is a string.
*/
static isString(data: any): boolean;
/**
* Checks if a value is an array.
*
* @param {*} data - The data to check.
* @returns {boolean} True if the data is an array.
*/
static isArray(data: any): boolean;
}