1 napi_valuetype valuetype[param_name_replace]; 2 /* [NAPI_GEN]: 获取入参类型,第[param_index_replace]个入参 3 * env: N-API环境的句柄,表示当前的上下文 4 * value: 要检查类型的js值 5 * result: 是一个指针,指向napi_valuetype枚举的值,函数会将结果存储在这里 6 */ 7 status = napi_typeof(env, args[[param_index_replace]], &valuetype[param_name_replace]); 8 if (status != napi_ok) { 9 getErrMessage(status, env, extended_error_info, "napi_typeof", tag); 10 return nullptr; 11 } 12[getParam_replace]