underscore.d.ts uniqueId always returns a string

_.uniqueId = function(prefix) {
    var id = ++idCounter + '';
    return prefix ? prefix + id : id;
  };

always returns string
This commit is contained in:
Andreas Frische
2016-01-04 20:47:10 +01:00
parent bdaf2f0eb1
commit b7ff5fe5ed
+1 -6
View File
@@ -1573,12 +1573,7 @@ interface UnderscoreStatic {
* @param prefix A prefix string to start the unique ID with.
* @return Unique string ID beginning with `prefix`.
**/
uniqueId(prefix: string): string;
/**
* @see _.uniqueId
**/
uniqueId(): number;
uniqueId(prefix?: string): string;
/**
* Escapes a string for insertion into HTML, replacing &, <, >, ", ', and / characters.