Skip to content

Commit

Permalink
feat: restore Assignable for backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Haynes committed Aug 27, 2024
1 parent b23e4c8 commit 9b86356
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .changeset/odd-tips-yawn.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@near-js/providers": major
"@near-js/signers": minor
"@near-js/transactions": minor
"@near-js/types": major
"@near-js/types": minor
"@near-js/utils": major
"@near-js/wallet-account": minor
---
Expand Down
8 changes: 8 additions & 0 deletions packages/types/src/assignable.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* DEPRECATED - backward compatibility only */
export abstract class Assignable {
constructor(properties: any) {
Object.keys(properties).map((key: any) => {
(this as any)[key] = properties[key];
});
}
}
1 change: 1 addition & 0 deletions packages/types/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './assignable';
export * from './enum';
export * from './errors';
export * from './provider';

0 comments on commit 9b86356

Please sign in to comment.