mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Picks up on the final two issues during testing.
This commit is contained in:
@@ -50,7 +50,7 @@ collection.slice(1, 3); // $ExpectType Collection<{ name: string; age: number; }
|
||||
collection.sort(); // $ExpectType Collection<{ name: string; age: number; }>
|
||||
collection.sortBy('name'); // $ExpectType Collection<{ name: string; age: number; }>
|
||||
collection.stringify(); // $ExpectType string
|
||||
collection.sum('age'); // $ExpectType any
|
||||
collection.sum('age'); // $ExpectType number
|
||||
collection.take(2); // $ExpectType Collection<{ name: string; age: number; }>
|
||||
Collection.macro('addToMembers', (collection, n) => collection.map((collectionItem: any) => collectionItem + n));
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -24,7 +24,7 @@ export default class Collection<T> {
|
||||
join(separator?: string): string;
|
||||
keys(): Collection<T>;
|
||||
last(callback?: ((item: T) => boolean)|null): T;
|
||||
map<R>(callback: (item: T) => R): Collection<T>;
|
||||
map<R>(callback: (item: T) => R): Collection<R>;
|
||||
pluck(property: string): Collection<T>;
|
||||
push(item: T): Collection<T>;
|
||||
reduce<R>(callback: (previous: R, current: T) => R, initial: R): R;
|
||||
|
||||
Reference in New Issue
Block a user