d-utils
Version:
d-utils
15 lines (14 loc) • 432 B
TypeScript
/**
* @description 检索数据类型并返回数据类型名称 object array string undefined bool number null 等等...
* @param { Any } data 要判断的数据
* @example
* checkType('1') // string
* @example
* checkType({}) // object
* @example
* checkType([]) // array
* @example
* checkType(localStorage) // storage
*/
declare function checkType<T>(data: T): string;
export default checkType;