Annotate arrays correctly

This commit is contained in:
Michael Heasell
2019-03-01 01:00:36 +00:00
parent 1e4a765e3a
commit a394b7d613
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -560,7 +560,7 @@ declare module _ {
pluck(
list: _.List<any>,
propertyName: string): any;
propertyName: string): any[];
/**
* Returns the maximum value in list.
+1 -1
View File
@@ -173,7 +173,7 @@ _.contains([1, 2, 3], 3, 1);
_.invoke([[5, 1, 7], [3, 2, 1]], 'sort');
// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/33479
var foo: any = {'a': 1, 'b': 2};
var foo: any[] = [{'a': 1, 'b': 2}];
_.pluck(foo, 'a');
var stooges = [{ name: 'moe', age: 40 }, { name: 'larry', age: 50 }, { name: 'curly', age: 60 }];