From 7cd517268bda5fe74b91dad02fedf8b51b7eae9b Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Sat, 11 Aug 2018 01:34:34 -0700 Subject: [PATCH] Fix error TS2307: Cannot find module --- src/api.ts | 5 +++-- src/transaction/types.ts | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/api.ts b/src/api.ts index c2b0245c..ee8eb686 100644 --- a/src/api.ts +++ b/src/api.ts @@ -69,7 +69,7 @@ import * as transactionUtils from './transaction/utils' import * as schemaValidator from './common/schema-validator' import {getServerInfo, getFee} from './common/serverinfo' import {clamp} from './ledger/utils' -import {Instructions} from './transaction/types' +import {Instructions, Prepare} from './transaction/types' export type APIOptions = { server?: string, @@ -205,7 +205,8 @@ class RippleAPI extends EventEmitter { * * You can later submit the transaction with `submit()`. */ - async prepareTransaction(txJSON: object, instructions: Instructions = {}) { + async prepareTransaction(txJSON: object, instructions: Instructions = {}): + Promise { return transactionUtils.prepareTransaction(txJSON, this, instructions) } diff --git a/src/transaction/types.ts b/src/transaction/types.ts index 1724578e..50b87144 100644 --- a/src/transaction/types.ts +++ b/src/transaction/types.ts @@ -22,10 +22,10 @@ export type Instructions = { export type Prepare = { txJSON: string, instructions: { - fee: string, - sequence: number, - maxLedgerVersion?: number - } + fee: string, + sequence: number, + maxLedgerVersion?: number + } } export type Submit = {