Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F/iterables #46

Merged
merged 9 commits into from
Oct 29, 2018
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions endpoints/attributes/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"compilerOptions": {
"target": "es5",
"lib" : [ "es2015", "dom"],
"module":"es6",
"declaration": true,
"importHelpers": true,
Expand Down
1 change: 1 addition & 0 deletions endpoints/localStorage/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"compilerOptions": {
"target": "es5",
"lib" : [ "es2015", "dom"],
"module":"es6",
"declaration": true,
"importHelpers": true,
Expand Down
1 change: 1 addition & 0 deletions endpoints/memory/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"compilerOptions": {
"target": "es5",
"module":"es6",
"lib" : [ "es2015", "dom"],
"declaration": true,
"importHelpers": true,
"moduleResolution": "node",
Expand Down
1 change: 1 addition & 0 deletions endpoints/proxy/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"target": "es5",
"module":"es6",
"declaration": true,
"lib" : [ "es2015", "dom"],
"importHelpers": true,
"moduleResolution": "node",
"sourceMap": true,
Expand Down
1 change: 1 addition & 0 deletions endpoints/restful/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"sourceMap": true,
"outDir": "./lib",
"noImplicitAny": false,
"lib" : [ "es2015", "dom"],
"removeComments":true,
"experimentalDecorators": true,
"baseUrl": ".",
Expand Down
16 changes: 15 additions & 1 deletion lib/collection/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface CollectionDefinition extends TransactionalDefinition {
itemEvents?: EventsDefinition;
_itemEvents?: EventMap;
}
export declare class Collection<R extends Record = Record> extends Transactional implements CollectionCore {
export declare class Collection<R extends Record = Record> extends Transactional implements CollectionCore, Iterable<R> {
_shared: number;
_aggregationError: R[];
static Subset: typeof Collection;
Expand All @@ -39,6 +39,9 @@ export declare class Collection<R extends Record = Record> extends Transactional
get(objOrId: string | R | Object): R;
each(iteratee: (val: R, key: number) => void, context?: any): void;
forEach(iteratee: (val: R, key?: number) => void, context?: any): void;
[ Symbol.iterator ](): CollectionValIterator<R>;
values(): CollectionValIterator<R>;
entries(): CollectionEntryIterator<R>;
every(iteratee: Predicate<R>, context?: any): boolean;
filter(iteratee: Predicate<R>, context?: any): R[];
find(iteratee: Predicate<R>, context?: any): R;
Expand Down Expand Up @@ -83,3 +86,14 @@ export declare class Collection<R extends Record = Record> extends Transactional
}
export declare type LiveUpdatesOption = boolean | ((x: any) => boolean);
export declare type ElementsArg = Object | Record | Object[] | Record[];
export declare class CollectionEntryIterator<R extends Record> implements Iterator<[number, R]> {
private idx;
private models;
constructor(collection: Collection<R>);
next(): IteratorResult<[number, R]>;
}
export declare class CollectionValIterator<R extends Record> implements Iterator<R> {
private entries;
constructor(collection: Collection<R>);
next(): IteratorResult<R>;
}
33 changes: 33 additions & 0 deletions lib/collection/index.js

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

2 changes: 1 addition & 1 deletion lib/collection/index.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions lib/index.js

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

2 changes: 1 addition & 1 deletion lib/index.js.map

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

2 changes: 1 addition & 1 deletion lib/object-plus/events.js

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

2 changes: 1 addition & 1 deletion lib/object-plus/events.js.map

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

2 changes: 1 addition & 1 deletion lib/object-plus/mixins.js

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

Loading