Robmoen has uploaded a new change for review.
https://gerrit.wikimedia.org/r/169552
Change subject: Document incomplete methods and classes.
......................................................................
Document incomplete methods and classes.
Change-Id: Ie1e360aa1979d8dc85ce8264b04332553cce6f0f
---
M javascripts/common/templates.js
M javascripts/common/templates/handlebars.js
M javascripts/common/templates/hogan.js
3 files changed, 11 insertions(+), 8 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Mantle
refs/changes/52/169552/1
diff --git a/javascripts/common/templates.js b/javascripts/common/templates.js
index 0648663..766dfb7 100644
--- a/javascripts/common/templates.js
+++ b/javascripts/common/templates.js
@@ -1,4 +1,6 @@
/**
+ * Helper for adding, getting, and compiling templates
+ *
* @singleton
* @class mw.mantle.template
*/
@@ -50,7 +52,7 @@
*
* @method
* @param {String} name Name of template to be retrieved
- * @return {Hogan.Template}
+ * @return {Hogan.Template|HandleBars.Template}
* accepts template data object as its argument.
*/
get: function( name ) {
@@ -64,7 +66,7 @@
* @method
* @param {string} templateBody Template body.
* @param {string} compilerName The name of a registered
compiler
- * @return {mixed} template interface
+ * @return {Hogan.Template|HandleBars.Template} template
interface
* accepts template data object as its argument.
*/
compile: function( templateBody, compilerName ) {
diff --git a/javascripts/common/templates/handlebars.js
b/javascripts/common/templates/handlebars.js
index 5df51e4..3cfcb42 100644
--- a/javascripts/common/templates/handlebars.js
+++ b/javascripts/common/templates/handlebars.js
@@ -1,6 +1,8 @@
-// Register the Handlebars compiler with MediaWiki.
+// Register the handlbar compiler with MediaWiki.
( function( M ) {
/**
+ * Helper class for compiling handlebar templates
+ *
* @class HandlebarsTemplateCompiler
* @singleton
*/
@@ -10,7 +12,7 @@
*
* @method
* @param {String} name Name of the template
- * @param {HandleBars.Template} partial
+ * @param {HandleBars.Template} template Compiled template to register
*/
registerPartial: function( name, template ) {
Handlebars.partials[ name ] = template.render;
@@ -24,7 +26,6 @@
*/
compile: function( src ) {
return {
- /** @param {*} data */
render: Handlebars.compile( src )
};
}
diff --git a/javascripts/common/templates/hogan.js
b/javascripts/common/templates/hogan.js
index 30adb28..b3bcb94 100644
--- a/javascripts/common/templates/hogan.js
+++ b/javascripts/common/templates/hogan.js
@@ -1,6 +1,8 @@
// Register the Hogan compiler with MediaWiki.
( function( M ) {
/**
+ * Helper class for compiling hogan templates
+ *
* @class HoganTemplateCompiler
* @singleton
*/
@@ -10,10 +12,8 @@
* Not used in Hogan compiler
*
* @method
- * @param {String} name Name of the template
- * @param {HandleBars.Template} partial
*/
- registerPartial: function( /* name, partial */ ) {},
+ registerPartial: function() {},
/**
* Compiler source code into a template object
*
--
To view, visit https://gerrit.wikimedia.org/r/169552
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1e360aa1979d8dc85ce8264b04332553cce6f0f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Mantle
Gerrit-Branch: master
Gerrit-Owner: Robmoen <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits