Skip to content

Commit 58813eb

Browse files
author
Vlad Balin
committed
Fixed assignFrom type signature
1 parent c05cd2c commit 58813eb

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
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.

dist/transactions.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export declare abstract class Transactional implements Messenger, Validatable, T
4848
transaction(fun: (self: this) => void, options?: TransactionOptions): void;
4949
updateEach(iteratee: (val: any, key: string) => void, options?: TransactionOptions): void;
5050
set(values: any, options?: TransactionOptions): this;
51-
assignFrom(source: Transactional): this;
51+
assignFrom(source: Transactional | Object): this;
5252
abstract _createTransaction(values: any, options?: TransactionOptions): Transaction;
5353
parse(data: any, options?: TransactionOptions): any;
5454
abstract toJSON(): {};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "type-r",
3-
"version": "1.0.0-rc97",
3+
"version": "1.0.0-rc98",
44
"description": "Reactive serializable data layer for modern JS applications",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",

src/transactions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ export abstract class Transactional implements Messenger, Validatable, Traversab
156156
}
157157

158158
// Assign transactional object "by value", copying aggregated items.
159-
assignFrom( source : Transactional ) : this {
160-
return this.set( source.__inner_state__ || source, { merge : true } );
159+
assignFrom( source : Transactional | Object ) : this {
160+
return this.set( ( <any>source ).__inner_state__ || source, { merge : true } );
161161
}
162162

163163
// Apply bulk object update without any notifications, and return open transaction.

0 commit comments

Comments
 (0)