Skip to content

Commit 3047d47

Browse files
committed
Updating externs for $location.search() to allow setting to a boolean.
This follows from a recent documentation update in angular/angular.js#8050 ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=70436361
1 parent 9baa36f commit 3047d47

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

contrib/externs/angular-1.2.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -1451,7 +1451,7 @@ angular.$interpolateProvider.endSymbol;
14511451
* protocol: function():string,
14521452
* replace: function(),
14531453
* search: function((string|Object.<string, string>)=,
1454-
* ?(string|Array.<string>)=): (!Object|angular.$location),
1454+
* ?(string|Array.<string>|boolean)=): (!Object|angular.$location),
14551455
* url: function(string=):string
14561456
* }}
14571457
*/
@@ -1496,7 +1496,7 @@ angular.$location.replace = function() {};
14961496

14971497
/**
14981498
* @param {(string|Object.<string, string>)=} opt_search
1499-
* @param {?(string|Array.<string>)=} opt_paramValue
1499+
* @param {?(string|Array.<string>|boolean)=} opt_paramValue
15001500
* @return {(!Object|angular.$location)}
15011501
*/
15021502
angular.$location.search = function(opt_search, opt_paramValue) {};
@@ -1942,6 +1942,9 @@ angular.$route.Route.regexp;
19421942
* $routeParams Service
19431943
*****************************************************************************/
19441944

1945+
// TODO: This should be !Object.<string|boolean> because valueless query params
1946+
// (without even an equal sign) come through as boolean "true".
1947+
19451948
/** @typedef {!Object.<string>} */
19461949
angular.$routeParams;
19471950

contrib/externs/angular-1.3.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -1433,7 +1433,7 @@ angular.$interpolateProvider.endSymbol;
14331433
* protocol: function():string,
14341434
* replace: function(),
14351435
* search: function((string|Object.<string, string>)=,
1436-
* ?(string|Array.<string>)=): (!Object|angular.$location),
1436+
* ?(string|Array.<string>|boolean)=): (!Object|angular.$location),
14371437
* url: function(string=):string
14381438
* }}
14391439
*/
@@ -1478,7 +1478,7 @@ angular.$location.replace = function() {};
14781478

14791479
/**
14801480
* @param {(string|Object.<string, string>)=} opt_search
1481-
* @param {?(string|Array.<string>)=} opt_paramValue
1481+
* @param {?(string|Array.<string>|boolean)=} opt_paramValue
14821482
* @return {(!Object|angular.$location)}
14831483
*/
14841484
angular.$location.search = function(opt_search, opt_paramValue) {};
@@ -1924,6 +1924,9 @@ angular.$route.Route.regexp;
19241924
* $routeParams Service
19251925
*****************************************************************************/
19261926

1927+
// TODO: This should be !Object.<string|boolean> because valueless query params
1928+
// (without even an equal sign) come through as boolean "true".
1929+
19271930
/** @typedef {!Object.<string>} */
19281931
angular.$routeParams;
19291932

0 commit comments

Comments
 (0)