Merge pull request #6499 from chrootsu/lodash-noop

lodash: signatures of the method _.noop changed
This commit is contained in:
Masahiro Wakame
2015-11-02 22:24:37 +09:00
2 changed files with 36 additions and 11 deletions
+28 -11
View File
@@ -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 _;
+8
View File
@@ -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 {
/**