Skip to content

Commit

Permalink
Fix declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
kamranayub committed Mar 15, 2016
1 parent f58591b commit 7e4d457
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 29 deletions.
26 changes: 13 additions & 13 deletions build/underscore-ko.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ interface KnockoutObservableArrayFunctions<T> {
* @param context `this` object in `iterator`, optional.
* @return The mapped array result.
**/
map<T, TResult>(iterator: _.ListIterator<T, TResult>, context?: any): TResult[];
map<TResult>(iterator: _.ListIterator<T, TResult>, context?: any): TResult[];
/**
* @see _.map
**/
collect<T, TResult>(iterator: _.ListIterator<T, TResult>, context?: any): TResult[];
collect<TResult>(iterator: _.ListIterator<T, TResult>, context?: any): TResult[];
/**
* Also known as inject and foldl, reduce boils down a list of values into a single value.
* Memo is the initial state of the reduction, and each successive step of it should be
Expand All @@ -41,15 +41,15 @@ interface KnockoutObservableArrayFunctions<T> {
* @param context `this` object in `iterator`, optional.
* @return Reduced object result.
**/
reduce<T, TResult>(iterator: _.MemoIterator<T, TResult>, memo?: TResult, context?: any): TResult;
reduce<TResult>(iterator: _.MemoIterator<T, TResult>, memo?: TResult, context?: any): TResult;
/**
* @see _.reduce
**/
inject<T, TResult>(iterator: _.MemoIterator<T, TResult>, memo?: TResult, context?: any): TResult;
inject<TResult>(iterator: _.MemoIterator<T, TResult>, memo?: TResult, context?: any): TResult;
/**
* @see _.reduce
**/
foldl<T, TResult>(iterator: _.MemoIterator<T, TResult>, memo?: TResult, context?: any): TResult;
foldl<TResult>(iterator: _.MemoIterator<T, TResult>, memo?: TResult, context?: any): TResult;
/**
* The right-associative version of reduce. Delegates to the JavaScript 1.8 version of
* reduceRight, if it exists. `foldr` is not as useful in JavaScript as it would be in a
Expand All @@ -59,11 +59,11 @@ interface KnockoutObservableArrayFunctions<T> {
* @param context `this` object in `iterator`, optional.
* @return Reduced object result.
**/
reduceRight<T, TResult>(iterator: _.MemoIterator<T, TResult>, memo?: TResult, context?: any): TResult;
reduceRight<TResult>(iterator: _.MemoIterator<T, TResult>, memo?: TResult, context?: any): TResult;
/**
* @see _.reduceRight
**/
foldr<T, TResult>(iterator: _.MemoIterator<T, TResult>, memo?: TResult, context?: any): TResult;
foldr<TResult>(iterator: _.MemoIterator<T, TResult>, memo?: TResult, context?: any): TResult;
/**
* Looks through each value in the list, returning the first one that passes a truth
* test (iterator). The function returns as soon as it finds an acceptable element,
Expand Down Expand Up @@ -201,7 +201,7 @@ interface KnockoutObservableArrayFunctions<T> {
* @param context `this` object in `iterator`, optional.
* @return A sorted copy of `list`.
**/
sortBy<T, TSort>(iterator?: _.ListIterator<T, TSort>, context?: any): T[];
sortBy<TSort>(iterator?: _.ListIterator<T, TSort>, context?: any): T[];
/**
* @see _.sortBy
* @param iterator Sort iterator for each element within `list`.
Expand Down Expand Up @@ -381,19 +381,19 @@ interface KnockoutObservableArrayFunctions<T> {
* @param context 'this' object in `iterator`, optional.
* @return Copy of `array` where all elements are unique.
**/
uniq<T, TSort>(isSorted?: boolean, iterator?: _.ListIterator<T, TSort>, context?: any): T[];
uniq<TSort>(isSorted?: boolean, iterator?: _.ListIterator<T, TSort>, context?: any): T[];
/**
* @see _.uniq
**/
uniq<T, TSort>(iterator?: _.ListIterator<T, TSort>, context?: any): T[];
uniq<TSort>(iterator?: _.ListIterator<T, TSort>, context?: any): T[];
/**
* @see _.uniq
**/
unique<T, TSort>(iterator?: _.ListIterator<T, TSort>, context?: any): T[];
unique<TSort>(iterator?: _.ListIterator<T, TSort>, context?: any): T[];
/**
* @see _.uniq
**/
unique<T, TSort>(isSorted?: boolean, iterator?: _.ListIterator<T, TSort>, context?: any): T[];
unique<TSort>(isSorted?: boolean, iterator?: _.ListIterator<T, TSort>, context?: any): T[];
/**
* Merges together the values of each of the arrays with the values at the corresponding position.
* Useful when you have separate data sources that are coordinated through matching array indexes.
Expand Down Expand Up @@ -464,7 +464,7 @@ interface KnockoutObservableArrayFunctions<T> {
* @param iterator Iterator to compute the sort ranking of each value, optional.
* @return The index where `value` should be inserted into `list`.
**/
sortedIndex<T, TSort>(value: T, iterator?: (x: T) => TSort, context?: any): number;
sortedIndex<TSort>(value: T, iterator?: (x: T) => TSort, context?: any): number;
/************
* Mutators *
************/
Expand Down
2 changes: 1 addition & 1 deletion build/underscore-ko.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/underscore-ko.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "underscore-ko",
"description": "Dead simple utility that attaches Underscore.js array and collection functions (and mutators) to Knockout.js observable arrays.",
"version": "1.8.1",
"version": "1.8.2",
"author": "Kamran Ayub <http://kamranicus.com>",
"homepage": "https://github.com/kamranayub/UnderscoreKO",
"repository": {
Expand Down
26 changes: 13 additions & 13 deletions src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ interface KnockoutObservableArrayFunctions<T> {
* @param context `this` object in `iterator`, optional.
* @return The mapped array result.
**/
map<T, TResult>(
map<TResult>(
iterator: _.ListIterator<T, TResult>,
context?: any): TResult[];

/**
* @see _.map
**/
collect<T, TResult>(
collect<TResult>(
iterator: _.ListIterator<T, TResult>,
context?: any): TResult[];

Expand All @@ -55,23 +55,23 @@ interface KnockoutObservableArrayFunctions<T> {
* @param context `this` object in `iterator`, optional.
* @return Reduced object result.
**/
reduce<T, TResult>(
reduce<TResult>(
iterator: _.MemoIterator<T, TResult>,
memo?: TResult,
context?: any): TResult;

/**
* @see _.reduce
**/
inject<T, TResult>(
inject<TResult>(
iterator: _.MemoIterator<T, TResult>,
memo?: TResult,
context?: any): TResult;

/**
* @see _.reduce
**/
foldl<T, TResult>(
foldl<TResult>(
iterator: _.MemoIterator<T, TResult>,
memo?: TResult,
context?: any): TResult;
Expand All @@ -85,15 +85,15 @@ interface KnockoutObservableArrayFunctions<T> {
* @param context `this` object in `iterator`, optional.
* @return Reduced object result.
**/
reduceRight<T, TResult>(
reduceRight<TResult>(
iterator: _.MemoIterator<T, TResult>,
memo?: TResult,
context?: any): TResult;

/**
* @see _.reduceRight
**/
foldr<T, TResult>(
foldr<TResult>(
iterator: _.MemoIterator<T, TResult>,
memo?: TResult,
context?: any): TResult;
Expand Down Expand Up @@ -287,7 +287,7 @@ interface KnockoutObservableArrayFunctions<T> {
* @param context `this` object in `iterator`, optional.
* @return A sorted copy of `list`.
**/
sortBy<T, TSort>(
sortBy<TSort>(
iterator?: _.ListIterator<T, TSort>,
context?: any): T[];

Expand Down Expand Up @@ -528,29 +528,29 @@ interface KnockoutObservableArrayFunctions<T> {
* @param context 'this' object in `iterator`, optional.
* @return Copy of `array` where all elements are unique.
**/
uniq<T, TSort>(
uniq<TSort>(
isSorted?: boolean,
iterator?: _.ListIterator<T, TSort>,
context?: any): T[];

/**
* @see _.uniq
**/
uniq<T, TSort>(
uniq<TSort>(
iterator?: _.ListIterator<T, TSort>,
context?: any): T[];

/**
* @see _.uniq
**/
unique<T, TSort>(
unique<TSort>(
iterator?: _.ListIterator<T, TSort>,
context?: any): T[];

/**
* @see _.uniq
**/
unique<T, TSort>(
unique<TSort>(
isSorted?: boolean,
iterator?: _.ListIterator<T, TSort>,
context?: any): T[];
Expand Down Expand Up @@ -644,7 +644,7 @@ interface KnockoutObservableArrayFunctions<T> {
* @param iterator Iterator to compute the sort ranking of each value, optional.
* @return The index where `value` should be inserted into `list`.
**/
sortedIndex<T, TSort>(
sortedIndex<TSort>(
value: T,
iterator?: (x: T) => TSort, context?: any): number;

Expand Down

0 comments on commit 7e4d457

Please sign in to comment.