UNPKG

type-tls

Version:

type-tls 封装了与类型相关的工具,比如:获取数据的类型 或 类型名字、判断数据的类型 等

58 lines (28 loc) 970 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [type-tls](./type-tls.md) &gt; [getTypeNameOf](./type-tls.gettypenameof.md) ## getTypeNameOf() function 获取 inst 的类型字符串 **Signature:** ```typescript export declare function getTypeNameOf(inst: any): LooseTypeName; ``` ## 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:** [LooseTypeName](./type-tls.loosetypename.md) inst 的类型字符串 ## Remarks 注意: 本方法返回的结果如下: undefined :"undefined" null : "null" 没有原型的对象(如:通过 Object.create(null) 创建的对象) : "object" 其它任何类型的实例 : 返回该实例的构造函数 或 包装对象的构造函数 的函数名字