Skip to content

consistent type exports #1439

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/xchain-aggregator/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export { Aggregator } from './aggregator'
export {
export type {
IProtocol,
QuoteSwapParams,
QuoteSwap,
Expand Down
2 changes: 1 addition & 1 deletion packages/xchain-aggregator/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ interface IProtocol {
shouldBeApproved(params: IsApprovedParams): Promise<boolean>
}

export {
export type {
IProtocol,
QuoteSwapParams,
QuoteSwap,
Expand Down
2 changes: 1 addition & 1 deletion packages/xchain-cosmos-sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export * from './client'
*/
export { base64ToBech32, bech32ToBase64, makeClientPath } from './utils'

export { Balance, Tx, TxFrom, TxTo, TxsPage, CompatibleAsset, TxParams } from './types'
export type { Balance, Tx, TxFrom, TxTo, TxsPage, CompatibleAsset, TxParams } from './types'
2 changes: 1 addition & 1 deletion packages/xchain-cosmos/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { CompatibleAsset, TxOfflineParams, TxParams } from './types'

export { TxOfflineParams, CompatibleAsset, TxParams }
export type { TxOfflineParams, CompatibleAsset, TxParams }
2 changes: 1 addition & 1 deletion packages/xchain-dash/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { DashPreparedTx, NodeAuth, NodeUrls } from './client-types'
export type { DashPreparedTx, NodeAuth, NodeUrls } from './client-types'
4 changes: 2 additions & 2 deletions packages/xchain-evm-providers/src/providers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
import { RoutescanProvider } from './routescan'

export * from './covalent/covalent-data-provider'
export {
export type {
GetBalanceResponse as CovalentGetBalanceResponse,
LogEventParam as CovalentLogEventParam,
LogEvent as CovalentLogEvent,
Expand All @@ -26,5 +26,5 @@ export {
GetTransactionsResponse as CovalentGetTransactionsResponse,
GetTransactionResponse as CovalentGetTransactionResponse,
getTxsParams as CovalentgetTxsParams,
RoutescanProvider,
}
export { RoutescanProvider }
4 changes: 2 additions & 2 deletions packages/xchain-evm/src/clients/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { Client as ClientLedger, EVMClientParams } from './client'
export { ClientKeystore, EVMKeystoreClientParams } from './clientKeystore'
export { Client as ClientLedger, type EVMClientParams } from './client'
export { ClientKeystore, type EVMKeystoreClientParams } from './clientKeystore'
6 changes: 3 additions & 3 deletions packages/xchain-evm/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ export {
ClientLedger,
ClientKeystore,
ClientKeystore as Client,
EVMKeystoreClientParams,
EVMClientParams,
type EVMKeystoreClientParams,
type EVMClientParams,
} from './clients'
export default ClientKeystore

export * from './types'

export { KeystoreSigner, KeystoreSignerParams, LedgerSigner, LedgerSignerParams } from './signers'
export { KeystoreSigner, type KeystoreSignerParams, LedgerSigner, type LedgerSignerParams } from './signers'

// Exporting utility functions
export {
Expand Down
4 changes: 2 additions & 2 deletions packages/xchain-evm/src/signers/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { KeystoreSigner, KeystoreSignerParams } from './keystoreSigner'
export { LedgerSigner, LedgerSignerParams } from './ledgerSigner'
export { KeystoreSigner, type KeystoreSignerParams } from './keystoreSigner'
export { LedgerSigner, type LedgerSignerParams } from './ledgerSigner'
2 changes: 1 addition & 1 deletion packages/xchain-evm/src/types/client-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ export type TxParams = BaseTxParams & {
isMemoEncoded?: boolean
}

export { CompatibleAsset, Balance, Tx, TxsPage }
export type { CompatibleAsset, Balance, Tx, TxsPage }
2 changes: 1 addition & 1 deletion packages/xchain-kujira/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { CompatibleAsset, TxParams } from './types'

export { CompatibleAsset, TxParams }
export type { CompatibleAsset, TxParams }
2 changes: 1 addition & 1 deletion packages/xchain-litecoin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export * from './types'
/**
* Export the 'Client' class from the 'client' module.
*/
export { NodeUrls, defaultLtcParams } from './client'
export { type NodeUrls, defaultLtcParams } from './client'
export { ClientKeystore, ClientKeystore as Client } from './ClientKeystore'
export { ClientLedger } from './ClientLedger'

Expand Down
2 changes: 1 addition & 1 deletion packages/xchain-mayachain/src/types/client-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ export type TxParams = BaseTxParams & {
asset?: CompatibleAsset
}

export { CompatibleAsset }
export type { CompatibleAsset }
2 changes: 1 addition & 1 deletion packages/xchain-thorchain/src/types/client-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ export type TxOfflineParams = TxParams & {
gasLimit?: BigNumber
}

export { CompatibleAsset }
export type { CompatibleAsset }
4 changes: 2 additions & 2 deletions packages/xchain-utxo-providers/src/providers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ export * from './sochainv3/sochain-api-types'
export * from './sochainv3/sochain-api'
export * from './sochainv3/sochain-data-provider'

export {
export type {
AddressDTO,
AddressParams,
AddressUTXO,
BalanceData,
GetTxsDTO,
HaskoinNetwork,
HaskoinResponse,
Transaction,
TxConfirmedStatus,
TxHashParams,
} from './haskoin/haskoin-api-types'
export { HaskoinNetwork } from './haskoin/haskoin-api-types'
export {
getAddress,
getBalance,
Expand Down
16 changes: 2 additions & 14 deletions packages/xchain-utxo/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,5 @@ import { Balance, PreparedTx, Tx, TxFrom, TxParams, TxTo, TxsPage, UTXO, UtxoCli
/**
* Exported symbols from the `Client`, `UTXO`, `UtxoClientParams`, `Witness`, and `PreparedTx` modules.
*/
export {
Client,
UTXO,
UtxoClientParams,
Witness,
PreparedTx,
Balance,
Tx,
TxsPage,
TxParams,
TxTo,
TxFrom,
toBitcoinJS,
}
export { Client, toBitcoinJS }
export type { UTXO, UtxoClientParams, Witness, PreparedTx, Balance, Tx, TxsPage, TxParams, TxTo, TxFrom }
2 changes: 1 addition & 1 deletion packages/xchain-utxo/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { Balance, PreparedTx, Tx, TxFrom, TxParams, TxTo, TxsPage, UTXO, UtxoClientParams, Witness } from './types'

export { UTXO, UtxoClientParams, Witness, PreparedTx, Balance, Tx, TxsPage, TxParams, TxFrom, TxTo }
export type { UTXO, UtxoClientParams, Witness, PreparedTx, Balance, Tx, TxsPage, TxParams, TxFrom, TxTo }
2 changes: 1 addition & 1 deletion packages/xchain-utxo/src/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ export type TxParams = BaseTxParams & {

export type UtxoOnlineDataProviders = Record<Network, UtxoOnlineDataProvider | undefined>

export { UTXO, Witness, Balance, Tx, TxsPage, TxFrom, TxTo }
export type { UTXO, Witness, Balance, Tx, TxsPage, TxFrom, TxTo }
2 changes: 1 addition & 1 deletion packages/xchain-wallet/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ import { Wallet } from './wallet'
*/
export { Wallet }

export { ChainBalances, EvmTxParams, UtxoTxParams, CosmosTxParams } from './types'
export type { ChainBalances, EvmTxParams, UtxoTxParams, CosmosTxParams } from './types'
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"es2017"
],
"importHelpers": true,
"isolatedModules": true,
"declaration": true,
"strict": true,
"noImplicitAny": true,
Expand Down