Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Unified Diff: ui/webui/resources/js/local_strings.js

Issue 405743002: Typecheck some of ui/webui/resources/js/ with Closure compiler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cr.isMac fix Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/webui/resources/js/load_time_data.js ('k') | ui/webui/resources/js/parse_html_subset.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/js/local_strings.js
diff --git a/ui/webui/resources/js/local_strings.js b/ui/webui/resources/js/local_strings.js
index 3209612e2ff518f9e7cd5ce93b2240bcdba7d853..e4f9259c5f733717d45bddb90808621714358e60 100644
--- a/ui/webui/resources/js/local_strings.js
+++ b/ui/webui/resources/js/local_strings.js
@@ -9,10 +9,11 @@
* {@code templateData}. This class provides a simpler interface to access those
* strings.
*
- * @param {Object} opt_templateData Optional object containing translated
- * strings. If this is not supplied during construction, it can be
- * assigned to the templateData property after construction. If all else
- * fails, the value of window.templateDate will be used.
+ * @param {Object=} opt_templateData Object containing translated strings. If
+ * this is not supplied during construction, it can be assigned to the
+ * templateData property after construction. If all else fails, the value
+ * of window.templateDate will be used.
+
* @constructor
*/
function LocalStrings(opt_templateData) {
@@ -26,7 +27,8 @@ function LocalStrings(opt_templateData) {
* Returns a formatted string where $1 to $9 are replaced by the second to the
* tenth argument.
* @param {string} s The format string.
- * @param {...string} The extra values to include in the formatted output.
+ * @param {Arguments} args The extra values to include in the formatted
+ * output.
* @return {string} The string after format substitution.
*/
function replaceArgs(s, args) {
@@ -49,13 +51,13 @@ function trimAccelerators(s) {
LocalStrings.prototype = {
/**
* The template data object.
- * @type {Object}
+ * @type {Object|undefined}
*/
- templateData: null,
+ templateData: undefined,
/**
* Gets a localized string by its id.
- * @param {string} s The ID of the string we want.
+ * @param {string} id The ID of the string we want.
* @return {string} The localized string.
*/
getString: function(id) {
@@ -72,7 +74,8 @@ LocalStrings.prototype = {
* Returns a formatted localized string where $1 to $9 are replaced by the
* second to the tenth argument.
* @param {string} id The ID of the string we want.
- * @param {...string} The extra values to include in the formatted output.
+ * @param {...string} var_args The extra values to include in the formatted
+ * output.
* @return {string} The formatted string.
*/
getStringF: function(id, var_args) {
« no previous file with comments | « ui/webui/resources/js/load_time_data.js ('k') | ui/webui/resources/js/parse_html_subset.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698