From e6d3c611765201d38c10e05e67ac567bf3a684c7 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Sun, 29 Nov 2020 19:03:06 +0100 Subject: [PATCH] Use type imports from @polkadot/types/interfaces (#4103) * Move chain params to apps-config * Use type imports from @polkadot/types/interfaces --- packages/apps/src/Menu/ChainInfo.tsx | 2 +- packages/page-accounts/src/modals/Delegate.tsx | 2 +- packages/page-claims/src/Attest.tsx | 2 +- packages/page-claims/src/util.ts | 2 +- packages/page-council/src/Motions/Close.tsx | 2 +- packages/page-council/src/Motions/Voters.tsx | 2 +- packages/page-council/src/Motions/Voting.tsx | 2 +- packages/page-council/src/Overview/Candidate.tsx | 2 +- packages/page-council/src/Overview/Voters.tsx | 2 +- packages/page-democracy/src/Overview/PreImage.tsx | 2 +- packages/page-democracy/src/Overview/PreImageButton.tsx | 2 +- packages/page-democracy/src/Overview/Voting.tsx | 2 +- packages/page-democracy/src/useChangeCalc.ts | 2 +- packages/page-democracy/src/util.ts | 2 +- packages/page-explorer/src/BestHash.tsx | 2 +- packages/page-explorer/src/BlockInfo/ByNumber.tsx | 2 +- packages/page-explorer/src/BlockInfo/index.tsx | 2 +- packages/page-explorer/src/Event.tsx | 2 +- packages/page-explorer/src/NodeInfo/Peers.tsx | 2 +- packages/page-parachains/src/Overview/types.ts | 2 +- packages/page-parachains/src/Parachain/DispatchQueue.tsx | 2 +- packages/page-society/src/Overview/Bid.tsx | 2 +- packages/page-society/src/Overview/Bids.tsx | 2 +- packages/page-society/src/draw/canary.ts | 2 +- packages/page-society/src/types.ts | 2 +- packages/page-society/src/useCounter.ts | 2 +- packages/page-staking/src/Actions/Account/Unbond.tsx | 2 +- packages/page-staking/src/Actions/types.ts | 2 +- packages/page-staking/src/Overview/Address/NominatedBy.tsx | 2 +- packages/page-staking/src/Overview/Address/StakeOther.tsx | 2 +- packages/page-staking/src/Slashes/types.ts | 2 +- packages/page-tech-comm/src/Overview/Members.tsx | 2 +- packages/page-tech-comm/src/Proposals/Close.tsx | 2 +- packages/page-tech-comm/src/Proposals/Voting.tsx | 2 +- packages/page-tech-comm/src/types.ts | 2 +- packages/page-tech-comm/src/useCounter.ts | 2 +- packages/page-treasury/src/Tips/Tip.tsx | 2 +- packages/react-components/src/ActionItem.tsx | 2 +- packages/react-components/src/AddressRow.tsx | 2 +- packages/react-components/src/AddressSmall.tsx | 2 +- packages/react-components/src/Available.tsx | 2 +- packages/react-components/src/Balance.tsx | 2 +- packages/react-components/src/Bonded.tsx | 2 +- packages/react-components/src/CallExpander.tsx | 2 +- packages/react-components/src/CryptoType.tsx | 2 +- packages/react-components/src/LockedVote.tsx | 2 +- packages/react-components/src/Nonce.tsx | 2 +- packages/react-components/src/ProposedAction.tsx | 2 +- packages/react-components/src/util/isTreasuryProposalVote.ts | 2 +- packages/react-components/src/util/toShortAddress.ts | 2 +- packages/react-hooks/src/useMembers.ts | 2 +- packages/react-hooks/src/useStashIds.ts | 2 +- packages/react-hooks/src/useVotingStatus.ts | 2 +- packages/react-hooks/src/useWeight.ts | 2 +- packages/react-query/src/BestFinalized.tsx | 2 +- packages/react-query/src/BestNumber.tsx | 2 +- packages/react-query/src/BlockAuthors.tsx | 2 +- packages/react-query/src/TimeNow.tsx | 2 +- packages/react-query/src/types.ts | 2 +- 59 files changed, 59 insertions(+), 59 deletions(-) diff --git a/packages/apps/src/Menu/ChainInfo.tsx b/packages/apps/src/Menu/ChainInfo.tsx index a7cac4dba0..cbe37bed21 100644 --- a/packages/apps/src/Menu/ChainInfo.tsx +++ b/packages/apps/src/Menu/ChainInfo.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { RuntimeVersion } from '@polkadot/types/interfaces'; +import type { RuntimeVersion } from '@polkadot/types/interfaces'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/page-accounts/src/modals/Delegate.tsx b/packages/page-accounts/src/modals/Delegate.tsx index 80ebb3779b..ebc02fba7f 100644 --- a/packages/page-accounts/src/modals/Delegate.tsx +++ b/packages/page-accounts/src/modals/Delegate.tsx @@ -1,13 +1,13 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { Conviction } from '@polkadot/types/interfaces'; import type { AmountValidateState } from '../Accounts/types'; import BN from 'bn.js'; import React, { useState } from 'react'; import { ConvictionDropdown, InputAddress, InputBalance, Modal, TxButton } from '@polkadot/react-components'; import { BalanceFree } from '@polkadot/react-query'; -import { Conviction } from '@polkadot/types/interfaces'; import { BN_ZERO } from '@polkadot/util'; import { useTranslation } from '../translate'; diff --git a/packages/page-claims/src/Attest.tsx b/packages/page-claims/src/Attest.tsx index fb90ec23c5..39df8daf50 100644 --- a/packages/page-claims/src/Attest.tsx +++ b/packages/page-claims/src/Attest.tsx @@ -3,13 +3,13 @@ import type { TxCallback } from '@polkadot/react-components/Status/types'; import type { Option } from '@polkadot/types'; +import type { BalanceOf, EthereumAddress, StatementKind } from '@polkadot/types/interfaces'; import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; import { Button, Card, TxButton } from '@polkadot/react-components'; import { useAccounts, useApi } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; -import { BalanceOf, EthereumAddress, StatementKind } from '@polkadot/types/interfaces'; import { ClaimStyles } from './Claim'; import Statement from './Statement'; diff --git a/packages/page-claims/src/util.ts b/packages/page-claims/src/util.ts index c36e369700..9c2fc6b306 100644 --- a/packages/page-claims/src/util.ts +++ b/packages/page-claims/src/util.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-claims authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { EthereumAddress, EcdsaSignature, StatementKind } from '@polkadot/types/interfaces'; +import type { EthereumAddress, EcdsaSignature, StatementKind } from '@polkadot/types/interfaces'; import secp256k1 from 'secp256k1/elliptic'; import registry from '@polkadot/react-api/typeRegistry'; diff --git a/packages/page-council/src/Motions/Close.tsx b/packages/page-council/src/Motions/Close.tsx index 1619a95e8b..059cd579c5 100644 --- a/packages/page-council/src/Motions/Close.tsx +++ b/packages/page-council/src/Motions/Close.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-council authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Hash, Proposal, ProposalIndex } from '@polkadot/types/interfaces'; +import type { Hash, Proposal, ProposalIndex } from '@polkadot/types/interfaces'; import React, { useState } from 'react'; import { Button, InputAddress, Modal, ProposedAction, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-council/src/Motions/Voters.tsx b/packages/page-council/src/Motions/Voters.tsx index eb6d367530..14a4701303 100644 --- a/packages/page-council/src/Motions/Voters.tsx +++ b/packages/page-council/src/Motions/Voters.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, MemberCount } from '@polkadot/types/interfaces'; +import type { AccountId, MemberCount } from '@polkadot/types/interfaces'; import React, { useMemo } from 'react'; import { AddressMini, Expander } from '@polkadot/react-components'; diff --git a/packages/page-council/src/Motions/Voting.tsx b/packages/page-council/src/Motions/Voting.tsx index 6a489e0f3a..959417c418 100644 --- a/packages/page-council/src/Motions/Voting.tsx +++ b/packages/page-council/src/Motions/Voting.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-council authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, Hash, Proposal, ProposalIndex } from '@polkadot/types/interfaces'; +import type { AccountId, Hash, Proposal, ProposalIndex } from '@polkadot/types/interfaces'; import React, { useState } from 'react'; import { Button, Modal, ProposedAction, TxButton, VoteAccount } from '@polkadot/react-components'; diff --git a/packages/page-council/src/Overview/Candidate.tsx b/packages/page-council/src/Overview/Candidate.tsx index 3afe000811..e2b546762f 100644 --- a/packages/page-council/src/Overview/Candidate.tsx +++ b/packages/page-council/src/Overview/Candidate.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, Balance } from '@polkadot/types/interfaces'; +import type { AccountId, Balance } from '@polkadot/types/interfaces'; import React from 'react'; import { AddressSmall, Tag } from '@polkadot/react-components'; diff --git a/packages/page-council/src/Overview/Voters.tsx b/packages/page-council/src/Overview/Voters.tsx index 70036616c8..b0ccdc9b21 100644 --- a/packages/page-council/src/Overview/Voters.tsx +++ b/packages/page-council/src/Overview/Voters.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, Balance } from '@polkadot/types/interfaces'; +import type { AccountId, Balance } from '@polkadot/types/interfaces'; import React from 'react'; import { AddressMini, Expander } from '@polkadot/react-components'; diff --git a/packages/page-democracy/src/Overview/PreImage.tsx b/packages/page-democracy/src/Overview/PreImage.tsx index 0fd7e3c561..0408c17d58 100644 --- a/packages/page-democracy/src/Overview/PreImage.tsx +++ b/packages/page-democracy/src/Overview/PreImage.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { SubmittableExtrinsic } from '@polkadot/api/promise/types'; -import { Hash } from '@polkadot/types/interfaces'; +import type { Hash } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import React, { useEffect, useState } from 'react'; diff --git a/packages/page-democracy/src/Overview/PreImageButton.tsx b/packages/page-democracy/src/Overview/PreImageButton.tsx index 38b70f709b..5b294196ac 100644 --- a/packages/page-democracy/src/Overview/PreImageButton.tsx +++ b/packages/page-democracy/src/Overview/PreImageButton.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Hash } from '@polkadot/types/interfaces'; +import type { Hash } from '@polkadot/types/interfaces'; import React from 'react'; import { Button } from '@polkadot/react-components'; diff --git a/packages/page-democracy/src/Overview/Voting.tsx b/packages/page-democracy/src/Overview/Voting.tsx index cb3df80300..162eacf9e0 100644 --- a/packages/page-democracy/src/Overview/Voting.tsx +++ b/packages/page-democracy/src/Overview/Voting.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { PropIndex, Proposal } from '@polkadot/types/interfaces'; +import type { PropIndex, Proposal } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import React, { useMemo, useState } from 'react'; diff --git a/packages/page-democracy/src/useChangeCalc.ts b/packages/page-democracy/src/useChangeCalc.ts index e27e00e528..b90d1f2c97 100644 --- a/packages/page-democracy/src/useChangeCalc.ts +++ b/packages/page-democracy/src/useChangeCalc.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { VoteThreshold } from '@polkadot/types/interfaces'; +import type { VoteThreshold } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import { useEffect, useState } from 'react'; diff --git a/packages/page-democracy/src/util.ts b/packages/page-democracy/src/util.ts index 492671a6a9..bf0afd9134 100644 --- a/packages/page-democracy/src/util.ts +++ b/packages/page-democracy/src/util.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { VoteThreshold } from '@polkadot/types/interfaces'; +import type { VoteThreshold } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import { calcPassing } from '@polkadot/api-derive/democracy/util'; diff --git a/packages/page-explorer/src/BestHash.tsx b/packages/page-explorer/src/BestHash.tsx index e5c26686f7..fb1a81bc48 100644 --- a/packages/page-explorer/src/BestHash.tsx +++ b/packages/page-explorer/src/BestHash.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Header } from '@polkadot/types/interfaces'; +import type { Header } from '@polkadot/types/interfaces'; import React from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/page-explorer/src/BlockInfo/ByNumber.tsx b/packages/page-explorer/src/BlockInfo/ByNumber.tsx index 01cc51eb4b..8b9449f38f 100644 --- a/packages/page-explorer/src/BlockInfo/ByNumber.tsx +++ b/packages/page-explorer/src/BlockInfo/ByNumber.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-explorer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Hash } from '@polkadot/types/interfaces'; +import type { Hash } from '@polkadot/types/interfaces'; import React, { useEffect, useState } from 'react'; import { Spinner } from '@polkadot/react-components'; diff --git a/packages/page-explorer/src/BlockInfo/index.tsx b/packages/page-explorer/src/BlockInfo/index.tsx index 6d6155dadb..c9d9d4e010 100644 --- a/packages/page-explorer/src/BlockInfo/index.tsx +++ b/packages/page-explorer/src/BlockInfo/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-explorer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { BlockNumber } from '@polkadot/types/interfaces'; +import type { BlockNumber } from '@polkadot/types/interfaces'; import React, { useEffect, useState } from 'react'; import { useParams } from 'react-router-dom'; diff --git a/packages/page-explorer/src/Event.tsx b/packages/page-explorer/src/Event.tsx index 9d1702ceb2..dc5f337ed7 100644 --- a/packages/page-explorer/src/Event.tsx +++ b/packages/page-explorer/src/Event.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-explorer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { EventRecord } from '@polkadot/types/interfaces'; +import type { EventRecord } from '@polkadot/types/interfaces'; import React from 'react'; import { Event as EventDisplay, Expander } from '@polkadot/react-components'; diff --git a/packages/page-explorer/src/NodeInfo/Peers.tsx b/packages/page-explorer/src/NodeInfo/Peers.tsx index cbf0a599a8..023292e2e3 100644 --- a/packages/page-explorer/src/NodeInfo/Peers.tsx +++ b/packages/page-explorer/src/NodeInfo/Peers.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-nodeinfo authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { PeerInfo } from '@polkadot/types/interfaces'; +import type { PeerInfo } from '@polkadot/types/interfaces'; import React, { useRef } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-parachains/src/Overview/types.ts b/packages/page-parachains/src/Overview/types.ts index 855eb12b3b..3388ad8c01 100644 --- a/packages/page-parachains/src/Overview/types.ts +++ b/packages/page-parachains/src/Overview/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ParaId, ParachainProposal } from '@polkadot/types/interfaces'; +import type { ParaId, ParachainProposal } from '@polkadot/types/interfaces'; export interface ProposalExt { id: ParaId; diff --git a/packages/page-parachains/src/Parachain/DispatchQueue.tsx b/packages/page-parachains/src/Parachain/DispatchQueue.tsx index f67b68516d..2042eaacab 100644 --- a/packages/page-parachains/src/Parachain/DispatchQueue.tsx +++ b/packages/page-parachains/src/Parachain/DispatchQueue.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { UpwardMessage } from '@polkadot/types/interfaces'; +import type { UpwardMessage } from '@polkadot/types/interfaces'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/page-society/src/Overview/Bid.tsx b/packages/page-society/src/Overview/Bid.tsx index 47dfca750d..f8b6ea1af4 100644 --- a/packages/page-society/src/Overview/Bid.tsx +++ b/packages/page-society/src/Overview/Bid.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Bid } from '@polkadot/types/interfaces'; +import type { Bid } from '@polkadot/types/interfaces'; import React, { useEffect, useState } from 'react'; import { AddressSmall, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-society/src/Overview/Bids.tsx b/packages/page-society/src/Overview/Bids.tsx index 9279bcd81d..67b9782936 100644 --- a/packages/page-society/src/Overview/Bids.tsx +++ b/packages/page-society/src/Overview/Bids.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Bid } from '@polkadot/types/interfaces'; +import type { Bid } from '@polkadot/types/interfaces'; import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; diff --git a/packages/page-society/src/draw/canary.ts b/packages/page-society/src/draw/canary.ts index 740fb71d41..3d3218e5d1 100644 --- a/packages/page-society/src/draw/canary.ts +++ b/packages/page-society/src/draw/canary.ts @@ -3,7 +3,7 @@ // Adapted (wih permission) from https://www.w3schools.com/code/tryit.asp?filename=GGIGKE2GG7N1 -import { AccountId } from '@polkadot/types/interfaces'; +import type { AccountId } from '@polkadot/types/interfaces'; // const DEFAULT_FN = (ctx: CanvasRenderingContext2D, path: Path2D) => ctx.fill(path); const PADD = 25; diff --git a/packages/page-society/src/types.ts b/packages/page-society/src/types.ts index 63afaa01b7..ca178f4ac1 100644 --- a/packages/page-society/src/types.ts +++ b/packages/page-society/src/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SocietyVote } from '@polkadot/types/interfaces'; +import type { SocietyVote } from '@polkadot/types/interfaces'; export interface OwnMembers { allMembers: string[]; diff --git a/packages/page-society/src/useCounter.ts b/packages/page-society/src/useCounter.ts index dd213d565e..46c8fb2a62 100644 --- a/packages/page-society/src/useCounter.ts +++ b/packages/page-society/src/useCounter.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Bid } from '@polkadot/types/interfaces'; +import type { Bid } from '@polkadot/types/interfaces'; import { useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/page-staking/src/Actions/Account/Unbond.tsx b/packages/page-staking/src/Actions/Account/Unbond.tsx index 2dc4db5080..51eee67f2b 100644 --- a/packages/page-staking/src/Actions/Account/Unbond.tsx +++ b/packages/page-staking/src/Actions/Account/Unbond.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, StakingLedger } from '@polkadot/types/interfaces'; +import type { AccountId, StakingLedger } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import React, { useState } from 'react'; diff --git a/packages/page-staking/src/Actions/types.ts b/packages/page-staking/src/Actions/types.ts index f68305ab0a..59c989bff6 100644 --- a/packages/page-staking/src/Actions/types.ts +++ b/packages/page-staking/src/Actions/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, Balance, UnappliedSlashOther } from '@polkadot/types/interfaces'; +import type { AccountId, Balance, UnappliedSlashOther } from '@polkadot/types/interfaces'; import BN from 'bn.js'; diff --git a/packages/page-staking/src/Overview/Address/NominatedBy.tsx b/packages/page-staking/src/Overview/Address/NominatedBy.tsx index 869ca5afc2..1143a59b2d 100644 --- a/packages/page-staking/src/Overview/Address/NominatedBy.tsx +++ b/packages/page-staking/src/Overview/Address/NominatedBy.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { EraIndex, SlashingSpans } from '@polkadot/types/interfaces'; +import type { EraIndex, SlashingSpans } from '@polkadot/types/interfaces'; import React, { useMemo } from 'react'; import { AddressMini, Expander, Spinner } from '@polkadot/react-components'; diff --git a/packages/page-staking/src/Overview/Address/StakeOther.tsx b/packages/page-staking/src/Overview/Address/StakeOther.tsx index 7ea4a05362..52b8ab3e7f 100644 --- a/packages/page-staking/src/Overview/Address/StakeOther.tsx +++ b/packages/page-staking/src/Overview/Address/StakeOther.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Balance } from '@polkadot/types/interfaces'; +import type { Balance } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import React, { useMemo } from 'react'; diff --git a/packages/page-staking/src/Slashes/types.ts b/packages/page-staking/src/Slashes/types.ts index 0fca9c9e98..c609d555f4 100644 --- a/packages/page-staking/src/Slashes/types.ts +++ b/packages/page-staking/src/Slashes/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { UnappliedSlash } from '@polkadot/types/interfaces'; +import type { UnappliedSlash } from '@polkadot/types/interfaces'; import BN from 'bn.js'; diff --git a/packages/page-tech-comm/src/Overview/Members.tsx b/packages/page-tech-comm/src/Overview/Members.tsx index f871ab74b0..bae4b1b082 100644 --- a/packages/page-tech-comm/src/Overview/Members.tsx +++ b/packages/page-tech-comm/src/Overview/Members.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-tech-comm authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId } from '@polkadot/types/interfaces'; +import type { AccountId } from '@polkadot/types/interfaces'; import React, { useRef } from 'react'; import { AddressSmall, Table, Tag } from '@polkadot/react-components'; diff --git a/packages/page-tech-comm/src/Proposals/Close.tsx b/packages/page-tech-comm/src/Proposals/Close.tsx index 00b379d81f..d4a856c561 100644 --- a/packages/page-tech-comm/src/Proposals/Close.tsx +++ b/packages/page-tech-comm/src/Proposals/Close.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-tech-comm authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Hash, Proposal, ProposalIndex } from '@polkadot/types/interfaces'; +import type { Hash, Proposal, ProposalIndex } from '@polkadot/types/interfaces'; import React, { useState } from 'react'; import { Button, InputAddress, Modal, ProposedAction, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-tech-comm/src/Proposals/Voting.tsx b/packages/page-tech-comm/src/Proposals/Voting.tsx index eafffb7ee2..8a926234ef 100644 --- a/packages/page-tech-comm/src/Proposals/Voting.tsx +++ b/packages/page-tech-comm/src/Proposals/Voting.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-tech-comm authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, Hash } from '@polkadot/types/interfaces'; +import type { AccountId, Hash } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import React, { useState } from 'react'; diff --git a/packages/page-tech-comm/src/types.ts b/packages/page-tech-comm/src/types.ts index ef02e81f62..286430746f 100644 --- a/packages/page-tech-comm/src/types.ts +++ b/packages/page-tech-comm/src/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, Hash } from '@polkadot/types/interfaces'; +import type { AccountId, Hash } from '@polkadot/types/interfaces'; export interface ComponentProps { className?: string; diff --git a/packages/page-tech-comm/src/useCounter.ts b/packages/page-tech-comm/src/useCounter.ts index 762d45b412..c6f01aaddb 100644 --- a/packages/page-tech-comm/src/useCounter.ts +++ b/packages/page-tech-comm/src/useCounter.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Hash } from '@polkadot/types/interfaces'; +import type { Hash } from '@polkadot/types/interfaces'; import { useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/page-treasury/src/Tips/Tip.tsx b/packages/page-treasury/src/Tips/Tip.tsx index 69c34bf302..00532b1611 100644 --- a/packages/page-treasury/src/Tips/Tip.tsx +++ b/packages/page-treasury/src/Tips/Tip.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, Balance, BlockNumber, OpenTip, OpenTipTo225 } from '@polkadot/types/interfaces'; +import type { AccountId, Balance, BlockNumber, OpenTip, OpenTipTo225 } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import React, { useEffect, useMemo, useState } from 'react'; diff --git a/packages/react-components/src/ActionItem.tsx b/packages/react-components/src/ActionItem.tsx index f8bf3a63de..9892d4499f 100644 --- a/packages/react-components/src/ActionItem.tsx +++ b/packages/react-components/src/ActionItem.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Proposal } from '@polkadot/types/interfaces'; +import type { Proposal } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import React from 'react'; diff --git a/packages/react-components/src/AddressRow.tsx b/packages/react-components/src/AddressRow.tsx index a832bb79ad..fdf7ef5488 100644 --- a/packages/react-components/src/AddressRow.tsx +++ b/packages/react-components/src/AddressRow.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; +import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/AddressSmall.tsx b/packages/react-components/src/AddressSmall.tsx index 7685ec1ab1..ae5fcc92fb 100644 --- a/packages/react-components/src/AddressSmall.tsx +++ b/packages/react-components/src/AddressSmall.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Address, AccountId } from '@polkadot/types/interfaces'; +import type { Address, AccountId } from '@polkadot/types/interfaces'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/Available.tsx b/packages/react-components/src/Available.tsx index 599d235300..2966e878bd 100644 --- a/packages/react-components/src/Available.tsx +++ b/packages/react-components/src/Available.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; +import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; import React from 'react'; import { Available } from '@polkadot/react-query'; diff --git a/packages/react-components/src/Balance.tsx b/packages/react-components/src/Balance.tsx index cd56f3d4d2..a6a78da07b 100644 --- a/packages/react-components/src/Balance.tsx +++ b/packages/react-components/src/Balance.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; +import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import React from 'react'; diff --git a/packages/react-components/src/Bonded.tsx b/packages/react-components/src/Bonded.tsx index d525a32448..42ff0c5df7 100644 --- a/packages/react-components/src/Bonded.tsx +++ b/packages/react-components/src/Bonded.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; +import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import React from 'react'; diff --git a/packages/react-components/src/CallExpander.tsx b/packages/react-components/src/CallExpander.tsx index fa4469bdd3..ee4628276c 100644 --- a/packages/react-components/src/CallExpander.tsx +++ b/packages/react-components/src/CallExpander.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Call } from '@polkadot/types/interfaces'; +import type { Call } from '@polkadot/types/interfaces'; import React from 'react'; diff --git a/packages/react-components/src/CryptoType.tsx b/packages/react-components/src/CryptoType.tsx index d8c5a761a5..7afc0871ef 100644 --- a/packages/react-components/src/CryptoType.tsx +++ b/packages/react-components/src/CryptoType.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; +import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; import React, { useEffect, useState } from 'react'; import keyring from '@polkadot/ui-keyring'; diff --git a/packages/react-components/src/LockedVote.tsx b/packages/react-components/src/LockedVote.tsx index 1a3cf084d0..b195630242 100644 --- a/packages/react-components/src/LockedVote.tsx +++ b/packages/react-components/src/LockedVote.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; +import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; import React from 'react'; import { LockedVote } from '@polkadot/react-query'; diff --git a/packages/react-components/src/Nonce.tsx b/packages/react-components/src/Nonce.tsx index 3e6910ed12..abb03df5ba 100644 --- a/packages/react-components/src/Nonce.tsx +++ b/packages/react-components/src/Nonce.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; +import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; import React from 'react'; import { Nonce } from '@polkadot/react-query'; diff --git a/packages/react-components/src/ProposedAction.tsx b/packages/react-components/src/ProposedAction.tsx index 0b3db0cdda..afdf6d0a52 100644 --- a/packages/react-components/src/ProposedAction.tsx +++ b/packages/react-components/src/ProposedAction.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Proposal } from '@polkadot/types/interfaces'; +import type { Proposal } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import React from 'react'; diff --git a/packages/react-components/src/util/isTreasuryProposalVote.ts b/packages/react-components/src/util/isTreasuryProposalVote.ts index 8ee1d8efb5..0e0db5f27d 100644 --- a/packages/react-components/src/util/isTreasuryProposalVote.ts +++ b/packages/react-components/src/util/isTreasuryProposalVote.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Proposal } from '@polkadot/types/interfaces'; +import type { Proposal } from '@polkadot/types/interfaces'; export default function isTreasuryProposalVote (proposal?: Proposal | null): boolean { if (!proposal) { diff --git a/packages/react-components/src/util/toShortAddress.ts b/packages/react-components/src/util/toShortAddress.ts index b45fb265bb..8f0a55e540 100644 --- a/packages/react-components/src/util/toShortAddress.ts +++ b/packages/react-components/src/util/toShortAddress.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; +import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; export default function toShortAddress (_address?: AccountId | AccountIndex | Address | string | null | Uint8Array): string { const address = (_address || '').toString(); diff --git a/packages/react-hooks/src/useMembers.ts b/packages/react-hooks/src/useMembers.ts index 0878f95ecb..138888b6f5 100644 --- a/packages/react-hooks/src/useMembers.ts +++ b/packages/react-hooks/src/useMembers.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId } from '@polkadot/types/interfaces'; +import type { AccountId } from '@polkadot/types/interfaces'; import { useMemo } from 'react'; import { useAccounts, useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/react-hooks/src/useStashIds.ts b/packages/react-hooks/src/useStashIds.ts index 599e232c08..6ccec9288c 100644 --- a/packages/react-hooks/src/useStashIds.ts +++ b/packages/react-hooks/src/useStashIds.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId } from '@polkadot/types/interfaces'; +import type { AccountId } from '@polkadot/types/interfaces'; import { useApi } from './useApi'; import { useCall } from './useCall'; diff --git a/packages/react-hooks/src/useVotingStatus.ts b/packages/react-hooks/src/useVotingStatus.ts index 77b0f3e70c..4962026aba 100644 --- a/packages/react-hooks/src/useVotingStatus.ts +++ b/packages/react-hooks/src/useVotingStatus.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { BlockNumber, Votes } from '@polkadot/types/interfaces'; +import type { BlockNumber, Votes } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import { useMemo } from 'react'; diff --git a/packages/react-hooks/src/useWeight.ts b/packages/react-hooks/src/useWeight.ts index bdc748a610..f97c82ec63 100644 --- a/packages/react-hooks/src/useWeight.ts +++ b/packages/react-hooks/src/useWeight.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Call } from '@polkadot/types/interfaces'; +import type { Call } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import { useEffect, useState } from 'react'; diff --git a/packages/react-query/src/BestFinalized.tsx b/packages/react-query/src/BestFinalized.tsx index 77b4ae8f24..b8458968d6 100644 --- a/packages/react-query/src/BestFinalized.tsx +++ b/packages/react-query/src/BestFinalized.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { BlockNumber } from '@polkadot/types/interfaces'; +import type { BlockNumber } from '@polkadot/types/interfaces'; import React from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/react-query/src/BestNumber.tsx b/packages/react-query/src/BestNumber.tsx index d2a0a3d320..bedb535d6c 100644 --- a/packages/react-query/src/BestNumber.tsx +++ b/packages/react-query/src/BestNumber.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { BlockNumber } from '@polkadot/types/interfaces'; +import type { BlockNumber } from '@polkadot/types/interfaces'; import React from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/react-query/src/BlockAuthors.tsx b/packages/react-query/src/BlockAuthors.tsx index ccfe862f48..fb4fe2aa04 100644 --- a/packages/react-query/src/BlockAuthors.tsx +++ b/packages/react-query/src/BlockAuthors.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { EraRewardPoints } from '@polkadot/types/interfaces'; +import type { EraRewardPoints } from '@polkadot/types/interfaces'; import React, { useEffect, useState } from 'react'; import { HeaderExtended } from '@polkadot/api-derive'; diff --git a/packages/react-query/src/TimeNow.tsx b/packages/react-query/src/TimeNow.tsx index 13d87dfd5e..b571b1075b 100644 --- a/packages/react-query/src/TimeNow.tsx +++ b/packages/react-query/src/TimeNow.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Moment } from '@polkadot/types/interfaces'; +import type { Moment } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import React, { useEffect, useState } from 'react'; diff --git a/packages/react-query/src/types.ts b/packages/react-query/src/types.ts index 882e0f19b1..1a6b644564 100644 --- a/packages/react-query/src/types.ts +++ b/packages/react-query/src/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { BlockNumber, EventRecord } from '@polkadot/types/interfaces'; +import type { BlockNumber, EventRecord } from '@polkadot/types/interfaces'; export interface IndexedEvent { indexes: number[];