Skip to content
This repository has been archived by the owner on Dec 25, 2018. It is now read-only.

Commit

Permalink
Added support for generators (Iterable<T>).
Browse files Browse the repository at this point in the history
Altered forEach to return a number instead of true, false, or other.
Includes Promise<T> prototype.
  • Loading branch information
electricessence committed May 21, 2016
1 parent 4f63765 commit 7be5cba
Show file tree
Hide file tree
Showing 88 changed files with 1,052 additions and 409 deletions.
2 changes: 1 addition & 1 deletion bower.json
@@ -1,6 +1,6 @@
{
"name": "typescript-dotnet",
"version": "2.13.3",
"version": "2.13.4",
"ignore": [
".bowercc",
".gitignore",
Expand Down
4 changes: 2 additions & 2 deletions dist/commonjs/System.Linq/Linq.d.ts
Expand Up @@ -105,7 +105,7 @@ export declare class Enumerable<T> extends InfiniteEnumerable<T> {
static generate<T>(factory: (index?: number) => T): InfiniteEnumerable<T>;
static generate<T>(factory: (index?: number) => T, count: number): FiniteEnumerable<T>;
static unfold<T>(seed: T, valueFactory: Selector<T, T>, skipSeed?: Boolean): InfiniteEnumerable<T>;
static forEach<T>(enumerable: IEnumerableOrArray<T>, action: (element: T, index?: number) => any): void;
static forEach<T>(enumerable: IEnumerableOrArray<T>, action: (element: T, index?: number) => any, max?: number): number;
static map<T, TResult>(enumerable: IEnumerableOrArray<T>, selector: Selector<T, TResult>): TResult[];
static max(values: FiniteEnumerable<number>): number;
static min(values: FiniteEnumerable<number>): number;
Expand All @@ -117,7 +117,7 @@ export declare class Enumerable<T> extends InfiniteEnumerable<T> {
takeUntil(predicate: Predicate<T>, includeUntilValue?: boolean): Enumerable<T>;
forEach(action: Predicate<T> | Action<T>): void;
toArray(predicate?: Predicate<T>): T[];
copyTo(target: T[], index?: number): T[];
copyTo(target: T[], index?: number, count?: number): T[];
toLookup<TKey, TValue, TCompare>(keySelector: Selector<T, TKey>, elementSelector?: Selector<T, TValue>, compareSelector?: Selector<TKey, TCompare>): ILookup<TKey, TValue>;
toMap<TResult>(keySelector: Selector<T, string>, elementSelector: Selector<T, TResult>): IMap<TResult>;
toDictionary<TKey, TValue, TCompare>(keySelector: Selector<T, TKey>, elementSelector: Selector<T, TValue>, compareSelector?: Selector<TKey, TCompare>): Dictionary<TKey, TValue>;
Expand Down
18 changes: 12 additions & 6 deletions dist/commonjs/System.Linq/Linq.js

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

2 changes: 1 addition & 1 deletion dist/commonjs/System.Linq/Linq.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/commonjs/System/Collections/CollectionBase.d.ts
Expand Up @@ -37,7 +37,7 @@ export declare abstract class CollectionBase<T> extends DisposableBase implement
importEntries(entries: IEnumerableOrArray<T>): number;
abstract getEnumerator(): IEnumerator<T>;
contains(entry: T): boolean;
forEach(action: Predicate<T> | Action<T>, useCopy?: boolean): void;
forEach(action: Predicate<T> | Action<T>, useCopy?: boolean): number;
copyTo<TTarget extends IArray<T>>(target: TTarget, index?: number): TTarget;
toArray(): T[];
}
Expand Down
9 changes: 6 additions & 3 deletions dist/commonjs/System/Collections/CollectionBase.js

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

2 changes: 1 addition & 1 deletion dist/commonjs/System/Collections/CollectionBase.js.map

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions dist/commonjs/System/Collections/Enumeration/Enumerator.d.ts
Expand Up @@ -6,12 +6,14 @@ import { Selector } from "../../FunctionTypes";
import { IEnumerator } from "./IEnumerator";
import { IEnumerable } from "./IEnumerable";
import { IEnumerableOrArray } from "../IEnumerableOrArray";
import { InfiniteValueFactory } from "./InfiniteEnumerator";
import { IIterator } from "./IIterator";
export declare function throwIfEndless(isEndless: boolean): void;
export declare const empty: IEnumerator<any>;
export declare function from<T>(source: IEnumerableOrArray<T>): IEnumerator<T>;
export declare function from<T>(source: IEnumerableOrArray<T> | InfiniteValueFactory<T> | IIterator<T>): IEnumerator<T>;
export declare function isEnumerable<T>(instance: any): instance is IEnumerable<T>;
export declare function isEnumerableOrArrayLike<T>(instance: any): instance is IEnumerableOrArray<T>;
export declare function isEnumerator<T>(instance: any): instance is IEnumerator<T>;
export declare function forEach<T>(e: IEnumerableOrArray<T> | IEnumerator<T>, action: (element: T, index?: number) => any): boolean | void;
export declare function toArray<T>(source: IEnumerableOrArray<T> | IEnumerator<T>): T[];
export declare function map<T, TResult>(source: IEnumerableOrArray<T> | IEnumerator<T>, selector: Selector<T, TResult>): TResult[];
export declare function isIterator<T>(instance: any): instance is IIterator<T>;
export declare function forEach<T>(e: IEnumerableOrArray<T> | IEnumerator<T> | IIterator<T>, action: (element: T, index?: number) => any, max?: number): number;
export declare function toArray<T>(source: IEnumerableOrArray<T> | IEnumerator<T>, max?: number): T[];
export declare function map<T, TResult>(source: IEnumerableOrArray<T> | IEnumerator<T>, selector: Selector<T, TResult>, max?: number): TResult[];
129 changes: 53 additions & 76 deletions dist/commonjs/System/Collections/Enumeration/Enumerator.js

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

0 comments on commit 7be5cba

Please sign in to comment.