Skip to content

Commit aeaeea0

Browse files
author
Vlad Balin
committed
Minor typings fixes
1 parent 5e5e65a commit aeaeea0

File tree

8 files changed

+15
-23
lines changed

8 files changed

+15
-23
lines changed

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/collection/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export interface CollectionDefinition extends TransactionalDefinition {
1717
}
1818
export declare class Collection<R extends Record = Record> extends Transactional implements CollectionCore {
1919
_shared: number;
20-
_aggregationError: Record[];
20+
_aggregationError: R[];
2121
static Subset: typeof Collection;
2222
static Refs: typeof Collection;
2323
static _SubsetOf: typeof Collection;
@@ -46,7 +46,7 @@ export declare class Collection<R extends Record = Record> extends Transactional
4646
_validateNested(errors: {}): number;
4747
model: typeof Record;
4848
idAttribute: string;
49-
constructor(records?: (Record | {})[], options?: CollectionOptions, shared?: number);
49+
constructor(records?: (R | {})[], options?: CollectionOptions, shared?: number);
5050
initialize(): void;
5151
readonly length: number;
5252
first(): R;

lib/collection/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"marked": "^0.3.6",
5656
"mocha": "^3.5.3",
5757
"reflect-metadata": "^0.1.10",
58-
"rollup": "^0.50.0",
58+
"rollup": "^0.50.1",
5959
"rollup-plugin-commonjs": "^8.2.6",
6060
"rollup-plugin-node-resolve": "^3.0.0",
6161
"rollup-plugin-sourcemaps": "^0.4.2",

src/collection/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class CollectionRefsType extends SharedType {
4949
})
5050
export class Collection< R extends Record = Record> extends Transactional implements CollectionCore {
5151
_shared : number
52-
_aggregationError : Record[]
52+
_aggregationError : R[]
5353

5454
static Subset : typeof Collection
5555
static Refs : typeof Collection
@@ -175,7 +175,7 @@ export class Collection< R extends Record = Record> extends Transactional implem
175175

176176
if( typeof objOrId === 'object' ){
177177
const id = objOrId[ this.idAttribute ];
178-
return ( id !== void 0 && this._byId[ id ] ) || this._byId[ (<Record>objOrId).cid ];
178+
return ( id !== void 0 && this._byId[ id ] ) || this._byId[ (<R>objOrId).cid ];
179179
}
180180
else{
181181
return this._byId[ objOrId ];
@@ -263,7 +263,7 @@ export class Collection< R extends Record = Record> extends Transactional implem
263263
// idAttribute extracted from the model type.
264264
idAttribute : string
265265

266-
constructor( records? : ( Record | {} )[], options : CollectionOptions = {}, shared? : number ){
266+
constructor( records? : ( R | {} )[], options : CollectionOptions = {}, shared? : number ){
267267
super( _count++ );
268268
this.models = [];
269269
this._byId = {};

tests/typescript/dist/index.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -339,11 +339,9 @@ function definitionDecorator(definitionKey, value) {
339339
return function (proto, name) {
340340
MixinsState
341341
.get(proto.constructor)
342-
.mergeObject(proto, (_a = {},
343-
_a[definitionKey] = (_b = {},
342+
.mergeObject(proto, (_a = {}, _a[definitionKey] = (_b = {},
344343
_b[name] = value,
345-
_b),
346-
_a));
344+
_b), _a));
347345
var _a, _b;
348346
};
349347
}
@@ -3446,12 +3444,6 @@ var Store = (function (_super) {
34463444
}(Record));
34473445
Store.global = new Store();
34483446

3449-
var on = (_a = Events, _a.on);
3450-
3451-
3452-
3453-
var _a;
3454-
34553447
var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
34563448

34573449

tests/typescript/dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)