Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export types used by exported variables #858

Merged
merged 1 commit into from
Mar 2, 2018
Merged

Export types used by exported variables #858

merged 1 commit into from
Mar 2, 2018

Conversation

intelliot
Copy link
Collaborator

@intelliot intelliot commented Mar 1, 2018

I found that tsc was giving me these errors:

src/api.ts(99,15): error TS4031: Public property 'connection' of exported class has or is using private name 'RestrictedConnection'.
src/api.ts(109,24): error TS4063: Parameter 'options' of constructor from exported class has or is using private name 'APIOptions'.
src/api.ts(221,3): error TS4029: Public property 'connect' of exported class has or is using name 'connect' from external module "/Users/user/ripple/ripple-lib/src/server/server" but cannot be named.
src/api.ts(222,3): error TS4029: Public property 'disconnect' of exported class has or is using name 'disconnect' from external module "/Users/user/ripple/ripple-lib/src/server/server" but cannot be named.
src/api.ts(223,3): error TS4029: Public property 'isConnected' of exported class has or is using name 'isConnected' from external module "/Users/user/ripple/ripple-lib/src/server/server" but cannot be named.
src/api.ts(224,3): error TS4029: Public property 'getServerInfo' of exported class has or is using name 'getServerInfo' from external module "/Users/user/ripple/ripple-lib/src/server/server" but cannot be named.
src/api.ts(225,3): error TS4029: Public property 'getFee' of exported class has or is using name 'getFee' from external module "/Users/user/ripple/ripple-lib/src/server/server" but cannot be named.
src/api.ts(226,3): error TS4029: Public property 'getLedgerVersion' of exported class has or is using name 'getLedgerVersion' from external module "/Users/user/ripple/ripple-lib/src/server/server" but cannot be named.
src/common/connection.ts(53,29): error TS4063: Parameter 'options' of constructor from exported class has or is using private name 'ConnectionOptions'.
src/common/types/commands/account_info.ts(17,16): error TS4033: Property 'queue_data' of exported interface has or is using private name 'QueueData'.
src/common/types/commands/book_offers.ts(18,11): error TS4033: Property 'offers' of exported interface has or is using private name 'OrderBookOffer'.
src/ledger/accountinfo.ts(33,46): error TS4078: Parameter 'options' of exported function has or is using private name 'GetAccountInfoOptions'.
src/ledger/accountinfo.ts(34,12): error TS4060: Return type of exported function has or is using private name 'FormattedGetAccountInfoResponse'.
src/ledger/balance-sheet.ts(51,46): error TS4078: Parameter 'options' of exported function has or is using private name 'BalanceSheetOptions'.
src/ledger/balance-sheet.ts(52,12): error TS4060: Return type of exported function has or is using private name 'GetBalanceSheet'.
src/ledger/balances.ts(51,12): error TS4060: Return type of exported function has or is using private name 'GetBalances'.
src/ledger/ledger.ts(13,29): error TS4078: Parameter 'options' of exported function has or is using private name 'LedgerOptions'.
src/ledger/orderbook.ts(104,14): error TS4078: Parameter 'orderbook' of exported function has or is using private name 'Orderbook'.
src/ledger/orderbook.ts(106,12): error TS4060: Return type of exported function has or is using private name 'GetOrderbook'.
src/ledger/parse/payment-channel.ts(46,53): error TS4060: Return type of exported function has or is using private name 'PaymentChannelResponse'.
src/ledger/settings.ts(46,48): error TS4078: Parameter 'options' of exported function has or is using private name 'SettingsOptions'.
src/ledger/settings.ts(47,12): error TS4060: Return type of exported function has or is using private name 'GetSettings'.
src/ledger/transaction-types.ts(136,31): error TS4081: Exported type alias 'TransactionType' has or is using private name 'PaymentTransaction'.
src/ledger/transaction-types.ts(136,52): error TS4081: Exported type alias 'TransactionType' has or is using private name 'OrderTransaction'.
src/ledger/transaction-types.ts(137,3): error TS4081: Exported type alias 'TransactionType' has or is using private name 'OrderCancellationTransaction'.
src/ledger/transaction-types.ts(137,34): error TS4081: Exported type alias 'TransactionType' has or is using private name 'TrustlineTransaction'.
src/ledger/transaction-types.ts(137,57): error TS4081: Exported type alias 'TransactionType' has or is using private name 'SettingsTransaction'.
src/ledger/transactions.ts(161,52): error TS4078: Parameter 'options' of exported function has or is using private name 'TransactionsOptions'.
src/ledger/transactions.ts(162,12): error TS4060: Return type of exported function has or is using private name 'GetTransactionsResponse'.
src/ledger/utils.ts(47,31): error TS4078: Parameter 'getter' of exported function has or is using private name 'Getter'.
src/ledger/utils.ts(64,51): error TS4078: Parameter 'order' of exported function has or is using private name 'RequestBookOffersArgs'.
src/transaction/escrow-cancellation.ts(29,23): error TS4078: Parameter 'escrowCancellation' of exported function has or is using private name 'EscrowCancellation'.
src/transaction/escrow-creation.ts(56,19): error TS4078: Parameter 'escrowCreation' of exported function has or is using private name 'EscrowCreation'.
src/transaction/escrow-execution.ts(44,20): error TS4078: Parameter 'escrowExecution' of exported function has or is using private name 'EscrowExecution'.
src/transaction/payment-channel-claim.ts(62,24): error TS4078: Parameter 'paymentChannelClaim' of exported function has or is using private name 'PaymentChannelClaim'.
src/transaction/payment-channel-create.ts(41,25): error TS4078: Parameter 'paymentChannelCreate' of exported function has or is using private name 'PaymentChannelCreate'.
src/transaction/payment-channel-fund.ts(29,23): error TS4078: Parameter 'paymentChannelFund' of exported function has or is using private name 'PaymentChannelFund'.
src/transaction/payment.ts(146,51): error TS4078: Parameter 'payment' of exported function has or is using private name 'Payment'.
src/transaction/settings.ts(149,53): error TS4078: Parameter 'settings' of exported function has or is using private name 'Settings'.

These occur due to generating TS declaration files (see #851).

This PR fixes the errors by exporting the types.

/cc @FredKSchott

Fixes TypeScript compile errors:
> Exported variable '…' has or is using private name '…'.

These occur due to generating TS declaration files.

See #851
@intelliot intelliot requested a review from FredKSchott March 1, 2018 21:45
@FredKSchott
Copy link
Contributor

@intelliot bah, good catch. We should really have travis setup to build / test each PR automatically. I can create the travis.yml file in a PR if you could turn Travis on for the repo?

@intelliot
Copy link
Collaborator Author

Sounds good. Travis has been on my to-do list!

@intelliot intelliot merged commit 144be08 into develop Mar 2, 2018
@intelliot intelliot deleted the export-types branch March 2, 2018 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants