private static JsImplType Typeof(object jsTypeOrName) { if (jsTypeOrName == null) { throw new JsError("Unknown type.").As <Exception>(); } if (JsContext.@typeof(jsTypeOrName) == "string") { return(JsImplType.GetType(jsTypeOrName.As <string>(), true)); } return(JsImplType._TypeOf(jsTypeOrName.As <JsType>())); }
private static JsImplType Typeof(object jsTypeOrName) { if (jsTypeOrName == null) { throw new JsError("Unknown type.").As <Exception>(); } if (JsTypeOf(jsTypeOrName) == JavaScript.JsTypes.function) { jsTypeOrName = JsTypeHelper.GetType(jsTypeOrName); } if (JsTypeOf(jsTypeOrName) == JavaScript.JsTypes.@string) { return(JsImplType.GetType(jsTypeOrName.As <string>(), true)); } return(JsImplType._TypeOf(jsTypeOrName.As <JsType>())); }