diff --git a/ix.js/ix.d.ts b/ix.js/ix.d.ts index 614a950fb..8de0366e7 100644 --- a/ix.js/ix.d.ts +++ b/ix.js/ix.d.ts @@ -48,7 +48,7 @@ declare module Ix { startWith(...values: T[]): Enumerable; - scan(seed: TSeed, accumulate: (acc: TAccumulator, item: T) => TAccumulator): Enumerable; + scan(seed: TAccumulate, accumulate: (acc: TAccumulate, item: T) => TAccumulate): Enumerable; scan(accumulate: (acc: T, item: T) => T): Enumerable; takeLast(count: number): Enumerable; diff --git a/ix.js/l2o-tests.ts b/ix.js/l2o-tests.ts index 2399d4e9f..1440faf85 100644 --- a/ix.js/l2o-tests.ts +++ b/ix.js/l2o-tests.ts @@ -41,7 +41,7 @@ ax.aggregate("", (acc, i) => acc + i, acc=> acc.length); ax.aggregate("", (acc, i) => acc + i); ax.aggregate((acc, i) => acc + i); -ax.reduce((acc, i) => acc + i, 100); +//ax.reduce((acc, i) => acc + i, 100); // bug: https://typescript.codeplex.com/workitem/1960 ax.reduce((acc, i) => acc + i); ax.all(item => true); @@ -83,7 +83,7 @@ dx.distinct((d1, d2) => d1 === d2); ax.elementAt(2); ax.elementAtOrDefault(2); -//ax.except(bx, ec_ns); // bug https://typescript.codeplex.com/workitem/1841 +ax.except(bx, ec_ns); bx.except(fx); ax.first(); @@ -96,14 +96,14 @@ ax.singleOrDefault(); ax.forEach(a => console.log(a)); ax.forEach(a => console.log(a), cx); -//bx.groupBy(b => b.length); // spec 3.5.2, waiting for restriction on generative recursion removal +bx.groupBy(b => b.length); bx.groupBy(b => b.length, b => "[" + b + "]"); bx.groupBy(b => b.length, b => "[" + b + "]", (l, values) => l + values.count()); bx.groupBy(b => b.length, false, (l, values) => l + values.count()); bx.groupBy(b => b.length, b => "[" + b + "]", (l, values) => l + values.count(), ec_nn); bx.groupBy(b => b.length, b => "[" + b + "]", false, (x, y) => x == y); bx.groupBy(b => b.length, false, (l, values) => l + values.count(), ec_nn); -//bx.groupBy(b => b.length, false, false, ec_nn); // spec 3.5.2, waiting for restriction on generative recursion removal +bx.groupBy(b => b.length, false, false, ec_nn); ax.groupJoin(bx, a => a, b => b, (a, b) => [a, b], ec_ns); ax.groupJoin(bx, a => a, b => b.length, (a, b) => [a, b]); @@ -111,7 +111,7 @@ ax.groupJoin(bx, a => a, b => b.length, (a, b) => [a, b]); ax.join(bx, a => a, b => b, (a, b) => [a, b], ec_ns); ax.join(bx, a => a, b => b.length, (a, b) => [a, b]); -//ax.intersect(bx, ec_ns); // bug https://typescript.codeplex.com/workitem/1841 +ax.intersect(bx, ec_ns); ax.intersect(cx); ax.union(cx); @@ -142,14 +142,14 @@ ax.takeWhile(a => a > 10); ax.toArray(); bx.toDictionary(b => b.length, b => 10, ec_nn); -//bx.toDictionary(b => b.length, false, ec_nn); // spec 3.5.2, waiting for restriction on generative recursion removal +bx.toDictionary(b => b.length, false, ec_nn); bx.toDictionary(b => b.length, b => 10); -//bx.toDictionary(b => b.length); // spec 3.5.2, waiting for restriction on generative recursion removal +bx.toDictionary(b => b.length); bx.toLookup(b => b.length, b => 10, ec_nn); -//bx.toLookup(b => b.length, false, ec_nn); // spec 3.5.2, waiting for restriction on generative recursion removal +bx.toLookup(b => b.length, false, ec_nn); bx.toLookup(b => b.length, b => 10); -//bx.toLookup(b => b.length); // spec 3.5.2, waiting for restriction on generative recursion removal +bx.toLookup(b => b.length); ax.where(a=> a > 10, {}); ax.where(a=> a > 10); diff --git a/ix.js/l2o.d.ts b/ix.js/l2o.d.ts index c3f3c415e..d36cb2530 100644 --- a/ix.js/l2o.d.ts +++ b/ix.js/l2o.d.ts @@ -91,9 +91,8 @@ declare module Ix { groupBy( keySelector: (item: T) => TKey, elementSelector: (item: T) => TElement): Grouping; - // spec 3.5.2, waiting for restriction on generative recursion removal - /*groupBy( - keySelector: (item: T) => TKey): Grouping;*/ + groupBy( + keySelector: (item: T) => TKey): Grouping; // if need to set comparer without resultSelector groupBy( @@ -108,12 +107,11 @@ declare module Ix { resultSelector: (key: TKey, values: Enumerable) => TResult, comparer?: EqualityComparer): Enumerable; // if need to set comparer without elementSelector and resultSelector - // spec 3.5.2, waiting for restriction on generative recursion removal - /*groupBy( + groupBy( keySelector: (item: T) => TKey, _: boolean, __: boolean, - comparer: EqualityComparer): Grouping;*/ + comparer: EqualityComparer): Grouping; groupJoin( inner: Enumerable, @@ -169,29 +167,25 @@ declare module Ix { keySelector: (item: T) => TKey, elementSelector: (item: T) => TValue, comparer?: EqualityComparer): Dictionary; - // spec 3.5.2, waiting for restriction on generative recursion removal - /*toDictionary( - keySelector: (item: T) => TKey): Dictionary;*/ + toDictionary( + keySelector: (item: T) => TKey): Dictionary; // if need to set comparer without elementSelector - // spec 3.5.2, waiting for restriction on generative recursion removal - /*toDictionary( + toDictionary( keySelector: (item: T) => TKey, _: boolean, - comparer: EqualityComparer): Dictionary;*/ + comparer: EqualityComparer): Dictionary; toLookup( keySelector: (item: T) => TKey, elementSelector: (item: T) => TValue, comparer?: EqualityComparer): Lookup; - // spec 3.5.2, waiting for restriction on generative recursion removal - /*toLookup( - keySelector: (item: T) => TKey): Lookup;*/ + toLookup( + keySelector: (item: T) => TKey): Lookup; // if need to set comparer without elementSelector - // spec 3.5.2, waiting for restriction on generative recursion removal - /*toLookup( + toLookup( keySelector: (item: T) => TKey, _: boolean, - comparer: EqualityComparer): Lookup;*/ + comparer: EqualityComparer): Lookup; where(selector: EnumerablePredicate, thisArg?: any): Enumerable; filter(selector: EnumerablePredicate, thisArg?: any): Enumerable;