mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-26 12:10:44 +08:00
lodash: changed _.noConflict() method
This commit is contained in:
1 parent
52b0ea5c97
commit
0f25d7ef28
2 files changed
+20
-5
No files matched your search
@@ -1716,8 +1716,6 @@ var testAttempFn: TestAttemptFn;
|
||||
result = <TResult|Error>_.attempt<TResult>(testAttempFn);
|
||||
result = <TResult|Error>_(testAttempFn).attempt<TResult>();
|
||||
|
||||
var lodash = <typeof _>_.noConflict();
|
||||
|
||||
result = <number>_.random(0, 5);
|
||||
result = <number>_.random(5);
|
||||
result = <number>_.random(5, true);
|
||||
@@ -2012,6 +2010,15 @@ result = <number>(_(TestMethodOfObject).methodOf<number>(1, 2).value())(['a', '0
|
||||
result = _(testMixinSource).mixin<TResult>(testMixinOptions).value();
|
||||
}
|
||||
|
||||
// _.noConflict
|
||||
{
|
||||
let result: typeof _;
|
||||
result = _.noConflict();
|
||||
result = _(42).noConflict();
|
||||
result = _<any>([]).noConflict();
|
||||
result = _({}).noConflict();
|
||||
}
|
||||
|
||||
// _.uniqueId
|
||||
result = <string>_.uniqueId();
|
||||
result = <string>_.uniqueId('');
|
||||
|
||||
Vendored
+11
-3
@@ -8262,9 +8262,17 @@ declare module _ {
|
||||
//_.noConflict
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Reverts the '_' variable to its previous value and returns a reference to the lodash function.
|
||||
* @return The lodash function.
|
||||
**/
|
||||
* Reverts the _ variable to its previous value and returns a reference to the lodash function.
|
||||
*
|
||||
* @return Returns the lodash function.
|
||||
*/
|
||||
noConflict(): typeof _;
|
||||
}
|
||||
|
||||
interface LoDashWrapperBase<T, TWrapper> {
|
||||
/**
|
||||
* @see _.noConflict
|
||||
*/
|
||||
noConflict(): typeof _;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user