typescript - 如何获取对象实例的类型
问题描述
我正在尝试在 Typescript 中获取对象实例的类型,到目前为止我得到了这个(下)。有什么办法可以写成一行吗?令人惊讶的是,我在 web/google 中找不到任何关于它的信息
const inst = new Matrix4();
type Matrix4 = typeof inst;
解决方案
推荐阅读
- excel - 基于二进制值在 Microsoft Excel 中对条形图进行颜色编码的技术是什么?
- c# - 使用 SqlBulkCopy 为训练/演示环境虚构数据 - 性能问题以及如何分页
- django - 在 Azure 中托管的 Python Web 应用程序中,服务器速度快时客户端响应时间慢的原因是什么
- javascript - 为什么 Internet Explorer 调试器在代码中和 iis 中将类型设置为 application/javascript 时将 javascript 文件识别为 text/html?
- java - 嗨,我是 Java 新手,我在试图找出底部“case SCISSORS:”的问题时遇到了麻烦,有人可以帮助我:)
- python - 如何从opencv中完全水平结构的非网格样式图像中提取字符串?
- r - R Date conversion for multiple data types
- android - 始终运行的前台服务是否会影响 Play 商店自动更新?
- google-apps-script - How do I edit loop in code to send one email with all data?
- google-apps-script - 使用 GAS 更改谷歌幻灯片中的页面大小