mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-25 11:11:46 +08:00
Merge pull request #6499 from chrootsu/lodash-noop
lodash: signatures of the method _.noop changed
This commit is contained in:
+28
-11
@@ -3739,17 +3739,6 @@ result = <number[]>_(new TestValueIn()).valuesIn<number>().value();
|
||||
* Utility *
|
||||
***********/
|
||||
|
||||
// _.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);
|
||||
|
||||
// _.property
|
||||
interface TestPropertyObject {
|
||||
a: {
|
||||
@@ -4462,6 +4451,34 @@ module TestMixin {
|
||||
result = _({}).noConflict();
|
||||
}
|
||||
|
||||
// _.noop
|
||||
module TestNoop {
|
||||
{
|
||||
let result: void;
|
||||
|
||||
result = _.noop();
|
||||
result = _.noop(1);
|
||||
result = _.noop('a', 1);
|
||||
result = _.noop(true, 'a', 1);
|
||||
|
||||
result = _('a').noop(true, 'a', 1);
|
||||
result = _([1]).noop(true, 'a', 1);
|
||||
result = _<string>([]).noop(true, 'a', 1);
|
||||
result = _({}).noop(true, 'a', 1);
|
||||
result = _(any).noop(true, 'a', 1);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<void>;
|
||||
|
||||
result = _('a').chain().noop(true, 'a', 1);
|
||||
result = _([1]).chain().noop(true, 'a', 1);
|
||||
result = _<string>([]).chain().noop(true, 'a', 1);
|
||||
result = _({}).chain().noop(true, 'a', 1);
|
||||
result = _(any).chain().noop(true, 'a', 1);
|
||||
}
|
||||
}
|
||||
|
||||
// _.runInContext
|
||||
{
|
||||
let result: typeof _;
|
||||
|
||||
Vendored
+8
@@ -10173,6 +10173,7 @@ declare module _ {
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* A no-operation function that returns undefined regardless of the arguments it receives.
|
||||
*
|
||||
* @return undefined
|
||||
*/
|
||||
noop(...args: any[]): void;
|
||||
@@ -10185,6 +10186,13 @@ declare module _ {
|
||||
noop(...args: any[]): void;
|
||||
}
|
||||
|
||||
interface LoDashExplicitWrapperBase<T, TWrapper> {
|
||||
/**
|
||||
* @see _.noop
|
||||
*/
|
||||
noop(...args: any[]): _.LoDashExplicitWrapper<void>;
|
||||
}
|
||||
|
||||
//_.property
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user