type-tls
Version:
type-tls 封装了与类型相关的工具,比如:获取数据的类型 或 类型名字、判断数据的类型 等
66 lines (35 loc) • 949 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [type-tls](./type-tls.md) > [getTypeOf](./type-tls.gettypeof.md)
## getTypeOf() function
获取 inst 的宽松类型
**Signature:**
```typescript
export declare function getTypeOf(inst: any): LooseType;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
inst
</td><td>
any
</td><td>
</td></tr>
</tbody></table>
**Returns:**
[LooseType](./type-tls.loosetype.md)
inst 的类型
## Remarks
注意: 本方法返回的结果如下:
```
undefined :undefined
null : null
function : Function
没有原型的对象(如:通过 Object.create(null) 创建的对象) : "object"
其它任何类型的实例 : 返回该实例的构造函数 或 包装对象的构造函数
```