Merge pull request #6566 from chrootsu/lodash-matchesProperty

lodash: signatures of the method _.matchesProperty have been changed
This commit is contained in:
Masahiro Wakame
2015-11-02 23:41:08 +09:00
2 changed files with 42 additions and 2 deletions
+26 -2
View File
@@ -4791,14 +4791,38 @@ module TestMatches {
{
let result: (value: any) => boolean;
result = _.matchesProperty<TResult>(path, source);
result = _(path).matchesProperty<TResult>(source).value();
}
{
let result: (value: TResult) => boolean;
result = _.matchesProperty<TResult, TResult>(path, source);
result = _(path).matchesProperty<TResult, TResult>(source).value();
}
{
let result: _.LoDashImplicitObjectWrapper<(value: any) => boolean>;
result = _(path).matchesProperty<TResult>(source);
}
{
let result: _.LoDashImplicitObjectWrapper<(value: TResult) => boolean>;
result = _(path).matchesProperty<TResult, TResult>(source);
}
{
let result: _.LoDashExplicitObjectWrapper<(value: any) => boolean>;
result = _(path).chain().matchesProperty<TResult>(source);
}
{
let result: _.LoDashExplicitObjectWrapper<(value: TResult) => boolean>;
result = _(path).chain().matchesProperty<TResult, TResult>(source);
}
}
+16
View File
@@ -10490,6 +10490,22 @@ declare module _ {
): LoDashImplicitObjectWrapper<(value: Value) => boolean>;
}
interface LoDashExplicitWrapperBase<T, TWrapper> {
/**
* @see _.matchesProperty
*/
matchesProperty<SrcValue>(
srcValue: SrcValue
): LoDashExplicitObjectWrapper<(value: any) => boolean>;
/**
* @see _.matchesProperty
*/
matchesProperty<SrcValue, Value>(
srcValue: SrcValue
): LoDashExplicitObjectWrapper<(value: Value) => boolean>;
}
//_.method
interface LoDashStatic {
/**