Skip to content

Commit ee356e5

Browse files
committed
Picks up on the final two issues during testing.
1 parent fa2d5d5 commit ee356e5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

types/collectionsjs/collectionsjs-tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ collection.slice(1, 3); // $ExpectType Collection<{ name: string; age: number; }
5050
collection.sort(); // $ExpectType Collection<{ name: string; age: number; }>
5151
collection.sortBy('name'); // $ExpectType Collection<{ name: string; age: number; }>
5252
collection.stringify(); // $ExpectType string
53-
collection.sum('age'); // $ExpectType any
53+
collection.sum('age'); // $ExpectType number
5454
collection.take(2); // $ExpectType Collection<{ name: string; age: number; }>
5555
Collection.macro('addToMembers', (collection, n) => collection.map((collectionItem: any) => collectionItem + n));
5656

types/collectionsjs/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default class Collection<T> {
2424
join(separator?: string): string;
2525
keys(): Collection<T>;
2626
last(callback?: ((item: T) => boolean)|null): T;
27-
map<R>(callback: (item: T) => R): Collection<T>;
27+
map<R>(callback: (item: T) => R): Collection<R>;
2828
pluck(property: string): Collection<T>;
2929
push(item: T): Collection<T>;
3030
reduce<R>(callback: (previous: R, current: T) => R, initial: R): R;

0 commit comments

Comments
 (0)