mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-27 11:40:08 +08:00
lodash: changed _.noop() method
This commit is contained in:
@@ -89,6 +89,8 @@ class Dog {
|
||||
|
||||
var result: any;
|
||||
|
||||
var any: any;
|
||||
|
||||
// _.MapCache
|
||||
var testMapCache: _.MapCache;
|
||||
result = <(key: string) => boolean>testMapCache.delete;
|
||||
@@ -1462,6 +1464,17 @@ result = <number>_.random(5, true);
|
||||
result = <number>_.random(1.2, 5.2);
|
||||
result = <number>_.random(0, 5, true);
|
||||
|
||||
// _.noop
|
||||
result = <void>_.noop();
|
||||
result = <void>_.noop(1);
|
||||
result = <void>_.noop('a', 1);
|
||||
result = <void>_.noop(true, 'a', 1);
|
||||
result = <void>_('a').noop(true, 'a', 1);
|
||||
result = <void>_([1]).noop(true, 'a', 1);
|
||||
result = <void>_<string>([]).noop(true, 'a', 1);
|
||||
result = <void>_({}).noop(true, 'a', 1);
|
||||
result = <void>_(any).noop(true, 'a', 1);
|
||||
|
||||
var object = {
|
||||
'cheese': 'crumpets',
|
||||
'stuff': function () {
|
||||
|
||||
Vendored
+16
-8
@@ -7299,6 +7299,22 @@ declare module _ {
|
||||
noConflict(): typeof _;
|
||||
}
|
||||
|
||||
//_.noop
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* A no-operation function that returns undefined regardless of the arguments it receives.
|
||||
* @return undefined
|
||||
*/
|
||||
noop(...args: any[]): void;
|
||||
}
|
||||
|
||||
interface LoDashWrapperBase<T, TWrapper> {
|
||||
/**
|
||||
* @see _.noop
|
||||
*/
|
||||
noop(...args: any[]): void;
|
||||
}
|
||||
|
||||
//_.property
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
@@ -7452,14 +7468,6 @@ declare module _ {
|
||||
uniqueId(prefix?: string): string;
|
||||
}
|
||||
|
||||
//_.noop
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* A no-operation function.
|
||||
**/
|
||||
noop(): void;
|
||||
}
|
||||
|
||||
//_.constant
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user