Lines Matching refs:key

6  * Get the |key| attribute in the given |dict| and verify that it is an
12 * @param {Object.<string,*>} dict The dictionary containing the |key|
13 * @param {string} key The key to typecheck in the |dict|.
14 * @param {Array=} opt_default The value to return if the key is not a bool.
15 * @return {Array} The |key| attribute value as an object.
17 function getArrayAttr(dict, key, opt_default) {
18 var value = /** @type {Array} */ (dict[key]);
21 throw 'Invalid data type for ' + key +
31 * Get the |key| attribute in the given |dict| and verify that it is a
37 * @param {Object.<string,*>} dict The dictionary containing the |key|
38 * @param {string} key The key to typecheck in the |dict|.
39 * @param {boolean=} opt_default The value to return if the key is not a bool.
40 * @return {boolean} The |key| attribute value as a boolean.
42 function getBooleanAttr(dict, key, opt_default) {
43 var value = /** @type {boolean} */ (dict[key]);
46 throw 'Invalid data type for ' + key +
56 * Get the |key| attribute in the given |dict| and verify that it is a
62 * @param {Object.<string,*>} dict The dictionary containing the |key|
63 * @param {string} key The key to typecheck in the |dict|.
64 * @param {number=} opt_default The value to return if the key is not a number.
65 * @return {number} The |key| attribute value as a number.
67 function getNumberAttr(dict, key, opt_default) {
68 var value = /** @type {number} */(dict[key]);
71 throw 'Invalid data type for ' + key +
81 * Get the |key| attribute in the given |dict| and verify that it is an
87 * @param {Object.<string,*>} dict The dictionary containing the |key|
88 * @param {string} key The key to typecheck in the |dict|.
89 * @param {Object=} opt_default The value to return if the key is not a bool.
90 * @return {Object} The |key| attribute value as an object.
92 function getObjectAttr(dict, key, opt_default) {
93 var value = /** @type {Object} */ (dict[key]);
96 throw 'Invalid data type for ' + key +
106 * Get the |key| attribute in the given |dict| and verify that it is a
112 * @param {Object.<string,*>} dict The dictionary containing the |key|
113 * @param {string} key The key to typecheck in the |dict|.
114 * @param {string=} opt_default The value to return if the key is not a string.
115 * @return {string} The |key| attribute value as a string.
117 function getStringAttr(dict, key, opt_default) {
118 var value = /** @type {string} */ (dict[key]);
121 throw 'Invalid data type for ' + key +