generated from PolymeshAssociation/typescript-boilerplate
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,16 @@ | ||
import { PolymeshError as PolymeshErrorClass } from './PolymeshError'; | ||
import { PolymeshTransaction as PolymeshTransactionClass } from './PolymeshTransaction'; | ||
import { TransactionQueue as TransactionQueueClass } from './TransactionQueue'; | ||
|
||
export type PolymeshTransaction = InstanceType<typeof PolymeshTransactionClass>; | ||
export type TransactionQueue = InstanceType<typeof TransactionQueueClass>; | ||
export type PolymeshError = InstanceType<typeof PolymeshErrorClass>; | ||
|
||
/** | ||
* @hidden | ||
*/ | ||
export function isPolymeshError(err: unknown): err is PolymeshError { | ||
const error = err as PolymeshError; | ||
|
||
return typeof error.code === 'string' && typeof error.message === 'string'; | ||
} |