小编vet*_*cka的帖子

在谷歌应用脚​​本平台上键入检查

有没有办法在google apps脚本中检查againts内置类型?我不知道如何访问内置类型的构造函数.所以我不能使用instaceof运算符.

例如个人资料(https://developers.google.com/apps-script/class_analytics_v3_schema_profile)

function getReportDataForProfile(profile) {
if (profile instanceof Profile) // Profile is undefined...
...
}
Run Code Online (Sandbox Code Playgroud)

还有什么是令人困惑的:当我得到一个Profile的实例(在变量配置文件中)

profile.constructor // is undefined
Run Code Online (Sandbox Code Playgroud)

google-apps-script

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

google-apps-script ×1