diff --git a/ix.js/l2o-tests.ts b/ix.js/l2o-tests.ts index 4be2974b3..2399d4e9f 100644 --- a/ix.js/l2o-tests.ts +++ b/ix.js/l2o-tests.ts @@ -96,14 +96,14 @@ ax.singleOrDefault(); ax.forEach(a => console.log(a)); ax.forEach(a => console.log(a), cx); -bx.groupBy(b => b.length); +//bx.groupBy(b => b.length); // spec 3.5.2, waiting for restriction on generative recursion removal 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); +//bx.groupBy(b => b.length, false, false, ec_nn); // spec 3.5.2, waiting for restriction on generative recursion removal 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]); @@ -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); +//bx.toDictionary(b => b.length, false, ec_nn); // spec 3.5.2, waiting for restriction on generative recursion removal bx.toDictionary(b => b.length, b => 10); -bx.toDictionary(b => b.length); +//bx.toDictionary(b => b.length); // spec 3.5.2, waiting for restriction on generative recursion removal bx.toLookup(b => b.length, b => 10, ec_nn); -bx.toLookup(b => b.length, false, 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, b => 10); -bx.toLookup(b => b.length); +//bx.toLookup(b => b.length); // spec 3.5.2, waiting for restriction on generative recursion removal ax.where(a=> a > 10, {}); ax.where(a=> a > 10); @@ -158,3 +158,64 @@ ax.filter(a=> a > 10); ax.zip(bx, (a: number, b: string) => [a, b]); ax.zip(bx, (a, b) => [a, b]); + +// Disposable + +{ + var d: Ix.Disposable; + + d.dispose(); +} + +// Enumerator + +{ + var e: Ix.Enumerator; + + try { + while (e.moveNext()) { var c = e.getCurrent(); } + } + finally { + e.dispose(); + } +} + +// Dictionary + +{ + var dic = new Ix.Dictionary(0, ec_nn); + + var key = dic.toEnumerable().first().key; + var value = dic.toEnumerable().first().value; + + dic.add(1, "1"); + dic.remove(1); + dic.clear(); + dic.length(); + dic.tryGetValue(1); + dic.get(1); + dic.set(1, "1"); + dic.getValues(); + dic.has(1); +} + +// KeyValuePair + +{ + var kv: Ix.KeyValuePair; + var key = kv.key; + var value = kv.value; +} + +// Lookup + +{ + var lookup: Ix.Lookup; + + var key = lookup.toEnumerable().first().key; + lookup.toEnumerable().first().first(); + + lookup.has(1); + lookup.length(); + lookup.get(1).first(); +} \ No newline at end of file diff --git a/ix.js/l2o.d.ts b/ix.js/l2o.d.ts index 44a5efda4..c3f3c415e 100644 --- a/ix.js/l2o.d.ts +++ b/ix.js/l2o.d.ts @@ -94,8 +94,6 @@ declare module Ix { // 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( @@ -116,11 +114,6 @@ declare module Ix { _: boolean, __: boolean, comparer: EqualityComparer): Grouping;*/ - groupBy( - keySelector: (item: T) => TKey, - _: boolean, - __: boolean, - comparer: EqualityComparer): Grouping; groupJoin( inner: Enumerable, @@ -179,18 +172,12 @@ declare module Ix { // 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( keySelector: (item: T) => TKey, _: boolean, comparer: EqualityComparer): Dictionary;*/ - toDictionary( - keySelector: (item: T) => TKey, - _: boolean, - comparer: EqualityComparer): Dictionary; toLookup( keySelector: (item: T) => TKey, @@ -199,18 +186,12 @@ declare module Ix { // 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( keySelector: (item: T) => TKey, _: boolean, comparer: EqualityComparer): Lookup;*/ - toLookup( - keySelector: (item: T) => TKey, - _: boolean, - comparer: EqualityComparer): Lookup; where(selector: EnumerablePredicate, thisArg?: any): Enumerable; filter(selector: EnumerablePredicate, thisArg?: any): Enumerable; @@ -249,7 +230,7 @@ declare module Ix { } export interface Lookup { - toEnumerable(): Enumerable>; + toEnumerable(): Enumerable>; has(key: TKey): boolean; length(): number; get(key: TKey): Enumerable;