mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-21 13:27:15 +08:00
lodash: changed _.uniqueId() method
This commit is contained in:
@@ -1735,9 +1735,6 @@ class Mage {
|
||||
}
|
||||
}
|
||||
|
||||
result = <string>_.uniqueId('contact_');
|
||||
result = <string>_.uniqueId();
|
||||
|
||||
/*********
|
||||
* String
|
||||
*********/
|
||||
@@ -1940,6 +1937,11 @@ result = <number>(_.methodOf<number>(TestMethodOfObject, 1, 2))(['a', '0']);
|
||||
result = <number>(_(TestMethodOfObject).methodOf<number>(1, 2).value())('a[0]');
|
||||
result = <number>(_(TestMethodOfObject).methodOf<number>(1, 2).value())(['a', '0']);
|
||||
|
||||
// _.uniqueId
|
||||
result = <string>_.uniqueId();
|
||||
result = <string>_.uniqueId('');
|
||||
result = <string>_('').uniqueId();
|
||||
|
||||
result = <string>_.VERSION;
|
||||
result = <_.Support>_.support;
|
||||
result = <_.TemplateSettings>_.templateSettings;
|
||||
|
||||
15
lodash/lodash.d.ts
vendored
15
lodash/lodash.d.ts
vendored
@@ -8338,13 +8338,20 @@ declare module _ {
|
||||
//_.uniqueId
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Generates a unique ID. If prefix is provided the ID will be appended to it.
|
||||
* @param prefix The value to prefix the ID with.
|
||||
* @return Returns the unique ID.
|
||||
**/
|
||||
* Generates a unique ID. If prefix is provided the ID is appended to it.
|
||||
* @param prefix The value to prefix the ID with.
|
||||
* @return Returns the unique ID.
|
||||
*/
|
||||
uniqueId(prefix?: string): string;
|
||||
}
|
||||
|
||||
interface LoDashWrapper<T> {
|
||||
/**
|
||||
* @see _.uniqueId
|
||||
*/
|
||||
uniqueId(): string;
|
||||
}
|
||||
|
||||
//_.constant
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user