Browse files

[cleanup] js-warnings: Less warnings in Google closure compiler (10 r…

…emaining).
  • Loading branch information...
1 parent 4a5e92d commit c4cbaf99fba05dfd68e086e0854d48d4061189a4 @fpessaux fpessaux committed Jun 23, 2011
View
14 build_rules.ml
@@ -410,6 +410,9 @@ rule "Client lib JS validation"
~deps: (
"qmljsimp/qmlJsImpClientLib.js" ::
"qmlcps/qmlCpsClientLib.js" ::
+ "opabsl/jsbsl/jquery_ext_bslanchor.extern.js" ::
+ "opabsl/jsbsl/jquery_ext_jQueryExtends.extern.js" ::
+ "opabsl/jsbsl/jquery_ext_1.6.1.externs.js" ::
(tool_deps "jschecker.jar") @
(tool_deps "jschecker_externals.js") @
(tool_deps "jschecker_clientliblib.js") @
@@ -430,6 +433,9 @@ rule "Client lib JS validation"
A"--js_output_file" :: A output_file ::
google_closure_compiler_options @
A"--js" :: A clientlib ::
+ A"--js" :: A "opabsl/jsbsl/jquery_ext_bslanchor.extern.js" ::
+ A"--js" :: A "opabsl/jsbsl/jquery_ext_jQueryExtends.extern.js" ::
+ A"--js" :: A "opabsl/jsbsl/jquery_ext_1.6.1.externs.js" ::
A"--js" :: A"qmlcps/qmlCpsClientLib.js" ::
[]
))
@@ -449,7 +455,10 @@ rule "opa-bslgenMLRuntime JS validation"
@ (tool_deps "jschecker_clientliblib.js")
@ (tool_deps "jschecker_cpsclientlib.js")
@ js_pp_bsl
- @ [ "opabsl/opabslgenJSkeys.js" ]
+ @ [ "opabsl/jsbsl/jquery_ext_bslanchor.extern.js" ;
+ "opabsl/jsbsl/jquery_ext_jQueryExtends.extern.js" ;
+ "opabsl/jsbsl/jquery_ext_1.6.1.externs.js" ;
+ "opabsl/opabslgenJSkeys.js" ]
)
~prods: ["opabsl/js_validation/bsl.js"]
(fun env build ->
@@ -468,6 +477,9 @@ rule "opa-bslgenMLRuntime JS validation"
A"--externs" :: (get_tool "jschecker_clientlib.js") ::
A"--externs" :: (get_tool "jschecker_jquery.js") ::
A"--externs" :: (get_tool "jschecker_cpsclientlib.js") ::
+ A"--externs" :: A "opabsl/jsbsl/jquery_ext_bslanchor.extern.js" ::
+ A"--externs" :: A "opabsl/jsbsl/jquery_ext_jQueryExtends.extern.js" ::
+ A"--externs" :: A "opabsl/jsbsl/jquery_ext_1.6.1.externs.js" ::
A"--js_output_file" :: A"opabsl/js_validation/bsl.js" ::
google_closure_compiler_options @
(List.fold_right (fun s acc -> arg_of_file s acc) js_pp_bsl [])
View
2 opabsl/jsbsl/bslCps.js
@@ -85,7 +85,7 @@ var empty_continuation = new Continuation(function() {return js_void});
/**
* @param f A function with OPA type [continuation('a) -> void],
* converted by CPS into [('a -> unit continuation -> unit) -> unit continuation -> unit)]
- * @param k A [continuation('a)], which must be called by [f] to return any result
+ * @param {{apply1}} k A [continuation('a)], which must be called by [f] to return any result
*
* This implementation mirrors [QmlCpsServerLib.uncps_directive]
*/
View
2 opabsl/jsbsl/bslSession.js
@@ -571,6 +571,7 @@ var LowLevelPingLoop = {};
/* ************************************************** */
/* Ping loop **************************************** */
+ /** @param {{ id, msg, herror, hsuccess, name, args }} srvmsg */
function recovers_from_server(srvmsg, ctx) {
var id = srvmsg.id;
var message = srvmsg.msg;
@@ -597,6 +598,7 @@ var LowLevelPingLoop = {};
}
/** Process messages according to here type */
+ /** @param {{ id, msg, herror, hsuccess, name, args }} mess */
function process_msg (mess){
switch(mess.type){
case "rpc" :
View
61 opabsl/jsbsl/jquery_ext_1.6.1.externs.js
@@ -0,0 +1,61 @@
+/*
+ Copyright © 2011 MLstate
+
+ This file is part of OPA.
+
+ OPA is free software: you can redistribute it and/or modify it under the
+ terms of the GNU Affero General Public License, version 3, as published by
+ the Free Software Foundation.
+
+ OPA is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with OPA. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*
+ @author Francois Pessaux
+*/
+
+/**
+ This file provides prototypes for function added by side effect to jQuery
+ by /opabsl/jsbsl/jquery-1.6.1.js. In effect we currently use the
+ jquery-1.6.1.js version of the JS source from Google but their
+ jquery-1.6.externs.js version of the JS prototypes. Hence, the present file
+ fills the holes and may become useless if the Google's prototype file gets
+ updated to a more recent version.
+ This code is not intended to be compiled and included in any binary, it only
+ serves to the Google Closure Compiler checker by giving it prototypes, hence
+ avoiding warnings.
+ In case the Google Closure Compiler checker is not more used by the build
+ system, this source file can be discarded from the Opa sources tree.
+ This source file is involved by the build system build_rules.ml for 2 rules:
+ - rule "Client lib JS validation"
+ - rule "opa-bslgenMLRuntime JS validation"
+**/
+
+
+
+/**
+ * @param {Event} evt
+ */
+jQuery.event.fix = function(evt) {} ;
+
+/**
+ * @type {{ready, live, remove, beforeunload, teardown}}
+ */
+jQuery.event.special = {
+ ready : {},
+ live : {},
+ remove : {},
+ beforeunload : {},
+ teardown : {}
+};
+
+/**
+ * @param {Event} evt
+ */
+jQuery.event.handle = function(evt) {} ;
View
51 opabsl/jsbsl/jquery_ext_bslanchor.extern.js
@@ -0,0 +1,51 @@
+/*
+ Copyright © 2011 MLstate
+
+ This file is part of OPA.
+
+ OPA is free software: you can redistribute it and/or modify it under the
+ terms of the GNU Affero General Public License, version 3, as published by
+ the Free Software Foundation.
+
+ OPA is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with OPA. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*
+ @author Francois Pessaux
+*/
+
+/**
+ This file provides prototypes for function added by side effect to jQuery
+ by /opabsl/jsbsl/bslAnchors.js.
+ This code is not intended to be compiled and included in any binary, it only
+ serves to the Google Closure Compiler checker by giving it prototypes, hence
+ avoiding warnings.
+ In case the Google Closure Compiler checker is not more used by the build
+ system, this source file can be discarded from the Opa sources tree.
+ This source file is involved by the build system build_rules.ml for 2 rules:
+ - rule "Client lib JS validation"
+ - rule "opa-bslgenMLRuntime JS validation"
+**/
+
+
+
+/**
+ * @param {!Function} callback
+ */
+jQuery.add_history_handler = function(callback) {};
+
+/**
+ * @param {!Function} callback
+ */
+jQuery.remove_history_handler = function(callback) {};
+
+/**
+ * @param {!Function} callback
+ */
+jQuery.push_state = function(callback) {};
View
51 opabsl/jsbsl/jquery_ext_jQueryExtends.extern.js
@@ -0,0 +1,51 @@
+/*
+ Copyright © 2011 MLstate
+
+ This file is part of OPA.
+
+ OPA is free software: you can redistribute it and/or modify it under the
+ terms of the GNU Affero General Public License, version 3, as published by
+ the Free Software Foundation.
+
+ OPA is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with OPA. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*
+ @author Francois Pessaux
+*/
+
+/**
+ This file provides prototypes for function added by side effect to jQuery
+ by /opabsl/jsbsl/jQueryExtends.js.
+ This code is not intended to be compiled and included in any binary, it only
+ serves to the Google Closure Compiler checker by giving it prototypes, hence
+ avoiding warnings.
+ In case the Google Closure Compiler checker is not more used by the build
+ system, this source file can be discarded from the Opa sources tree.
+ This source file is involved by the build system build_rules.ml for 2 rules:
+ - rule "Client lib JS validation"
+ - rule "opa-bslgenMLRuntime JS validation"
+**/
+
+
+
+/**
+ * @param {string} evt_name
+ * @param {!Function} callback
+ */
+jQuery.prototype.opabind = function(evt_name, callback) {};
+
+Element.prototype.style.MozTransformOrigin = '' ;
+
+Element.prototype.style.msTransformOrigin = '' ;
+
+Element.prototype.style.MozTransform = '' ;
+
+Element.prototype.style.msTransform = '' ;
+
View
2 opabsl/jsbsl/jsExtends.js
@@ -175,7 +175,7 @@ Array.prototype.inArray = function (value)
/**
* Remove blank char at left and right.
- * @return {string} trimed string
+ * @return {String|string} trimed string
**/
String.prototype.trim = function ()
{

0 comments on commit c4cbaf9

Please sign in to comment.