Skip to content

Function: getType() ​

ts
function getType(value: any): string

获取数据类型

Example ​

ts
const type = getType('你好');
type === 'String';

Parameters ​

ParameterTypeDescription

value

any

任意值

Returns ​

string

类型字符串, 如'String'、'Map'等