diff --git a/packages/app-123code/src/SummaryBar.tsx b/packages/app-123code/src/SummaryBar.tsx index 989995fecb..4cbd7a8fed 100644 --- a/packages/app-123code/src/SummaryBar.tsx +++ b/packages/app-123code/src/SummaryBar.tsx @@ -15,7 +15,7 @@ import { formatBalance, formatNumber } from '@polkadot/util'; import translate from './translate'; -type Props = ApiProps & BareProps & I18nProps & { +interface Props extends ApiProps, BareProps, I18nProps { balances_totalIssuance?: BN; chain_bestNumber?: BN; chain_bestNumberLag?: BN; @@ -25,7 +25,8 @@ type Props = ApiProps & BareProps & I18nProps & { system_chain?: string; system_name?: string; system_version?: string; -}; +} + interface State { nextUp: AccountId[]; } diff --git a/packages/app-123code/src/index.tsx b/packages/app-123code/src/index.tsx index 5086a5c0ec..7048a5888e 100644 --- a/packages/app-123code/src/index.tsx +++ b/packages/app-123code/src/index.tsx @@ -19,7 +19,8 @@ import Transfer from './Transfer'; import translate from './translate'; // define out internal types -type Props = AppProps & I18nProps; +interface Props extends AppProps, I18nProps {} + interface State { accountId?: string; } diff --git a/packages/app-accounts/src/index.tsx b/packages/app-accounts/src/index.tsx index d2091673dc..07a3e323eb 100644 --- a/packages/app-accounts/src/index.tsx +++ b/packages/app-accounts/src/index.tsx @@ -18,9 +18,9 @@ import Overview from './Overview'; import translate from './translate'; import Vanity from './Vanity'; -type Props = AppProps & I18nProps & { +interface Props extends AppProps, I18nProps { allAccounts?: SubjectInfo; -}; +} interface State { hidden: string[]; diff --git a/packages/app-address-book/src/index.tsx b/packages/app-address-book/src/index.tsx index 1595ea629f..801b397048 100644 --- a/packages/app-address-book/src/index.tsx +++ b/packages/app-address-book/src/index.tsx @@ -17,9 +17,9 @@ import basicMd from './md/basic.md'; import Overview from './Overview'; import translate from './translate'; -type Props = AppProps & I18nProps & { +interface Props extends AppProps, I18nProps { allAddresses?: SubjectInfo; -}; +} interface State { hidden: string[]; diff --git a/packages/app-contracts/src/index.tsx b/packages/app-contracts/src/index.tsx index 14b2033e8b..fc8ce83c4e 100644 --- a/packages/app-contracts/src/index.tsx +++ b/packages/app-contracts/src/index.tsx @@ -7,7 +7,7 @@ import { TabItem } from '@polkadot/react-components/Tabs'; import { ComponentProps, LocationProps } from './types'; import React from 'react'; -import { Route, RouteComponentProps, Switch } from 'react-router'; +import { Route, Switch } from 'react-router'; import { withRouter } from 'react-router-dom'; import { HelpOverlay, Tabs } from '@polkadot/react-components'; import { withMulti, withObservable } from '@polkadot/react-api'; @@ -21,10 +21,10 @@ import Contracts from './Contracts'; import Codes from './Codes'; import Deploy from './Deploy'; -type Props = AppProps & I18nProps & RouteComponentProps & { +interface Props extends AppProps, I18nProps { accounts: SubjectInfo[]; contracts: SubjectInfo[]; -}; +} interface State { codeHash?: string; diff --git a/packages/app-explorer/src/BestHash.tsx b/packages/app-explorer/src/BestHash.tsx index 691c1f34cd..b4efa6d612 100644 --- a/packages/app-explorer/src/BestHash.tsx +++ b/packages/app-explorer/src/BestHash.tsx @@ -9,10 +9,10 @@ import { BareProps, CallProps } from '@polkadot/react-api/types'; import React from 'react'; import { withCalls } from '@polkadot/react-api'; -type Props = BareProps & CallProps & { +interface Props extends BareProps, CallProps { label?: string; chain_subscribeNewHeads?: Header; -}; +} class BestHash extends React.PureComponent { public render (): React.ReactNode { diff --git a/packages/app-extrinsics/src/Balance.tsx b/packages/app-extrinsics/src/Balance.tsx index 63cd7a4510..d3e44250f0 100644 --- a/packages/app-extrinsics/src/Balance.tsx +++ b/packages/app-extrinsics/src/Balance.tsx @@ -10,10 +10,10 @@ import { DerivedBalances } from '@polkadot/api-derive/types'; import { withCalls, withMulti } from '@polkadot/react-api'; import { InputBalance } from '@polkadot/react-components'; -type Props = BareProps & CallProps & { +interface Props extends BareProps, CallProps { balances_all?: DerivedBalances; label?: React.ReactNode; -}; +} class BalanceDisplay extends React.PureComponent { public render (): React.ReactNode { diff --git a/packages/app-js/src/Playground.tsx b/packages/app-js/src/Playground.tsx index 4ecad7301f..33ad030df6 100644 --- a/packages/app-js/src/Playground.tsx +++ b/packages/app-js/src/Playground.tsx @@ -42,7 +42,7 @@ interface Injected { window: null; } -type Props = ApiProps & AppProps & I18nProps & { +interface Props extends ApiProps, AppProps, I18nProps { match: { params: { base64?: string; @@ -50,7 +50,7 @@ type Props = ApiProps & AppProps & I18nProps & { }; // FIXME wait for proper eslint integration in tslint, then hopefully remove this history: any; -}; +} interface State { animated: boolean; diff --git a/packages/app-settings/src/Developer.tsx b/packages/app-settings/src/Developer.tsx index 2be8fbb980..68454264c7 100644 --- a/packages/app-settings/src/Developer.tsx +++ b/packages/app-settings/src/Developer.tsx @@ -14,9 +14,9 @@ import { isJsonObject, stringToU8a, u8aToString } from '@polkadot/util'; import translate from './translate'; -type Props = AppProps & I18nProps & { +interface Props extends AppProps, I18nProps { onStatusChange: (status: ActionStatus) => void; -}; +} interface State { code: string; diff --git a/packages/app-settings/src/General.tsx b/packages/app-settings/src/General.tsx index 1a4a4f1561..4d0024a518 100644 --- a/packages/app-settings/src/General.tsx +++ b/packages/app-settings/src/General.tsx @@ -13,9 +13,9 @@ import uiSettings from '@polkadot/ui-settings'; import translate from './translate'; -type Props = AppProps & I18nProps & { +interface Props extends AppProps, I18nProps { onStatusChange: (status: ActionStatus) => void; -}; +} interface State { isCustomNode: boolean; diff --git a/packages/app-toolbox/src/index.tsx b/packages/app-toolbox/src/index.tsx index 227209a0bf..601baba5c4 100644 --- a/packages/app-toolbox/src/index.tsx +++ b/packages/app-toolbox/src/index.tsx @@ -17,9 +17,9 @@ import Sign from './Sign'; import Verify from './Verify'; import translate from './translate'; -type Props = AppProps & I18nProps & { +interface Props extends AppProps, I18nProps { allAccounts?: SubjectInfo; -}; +} interface State { tabs: TabItem[]; diff --git a/packages/react-query/src/AccountIndex.tsx b/packages/react-query/src/AccountIndex.tsx index 26e2bfd40e..ad8a8b3cd8 100644 --- a/packages/react-query/src/AccountIndex.tsx +++ b/packages/react-query/src/AccountIndex.tsx @@ -9,12 +9,12 @@ import { AccountId, AccountIndex } from '@polkadot/types/interfaces'; import React from 'react'; import { withCalls } from '@polkadot/react-api'; -type Props = BareProps & CallProps & { +interface Props extends BareProps, CallProps { children?: React.ReactNode; label?: React.ReactNode; params?: string; accounts_idAndIndex?: [AccountId?, AccountIndex?]; -}; +} export class AccountIndexDisplay extends React.PureComponent { public render (): React.ReactNode { diff --git a/packages/react-query/src/Available.tsx b/packages/react-query/src/Available.tsx index 30e95ff6a1..f6e406ef11 100644 --- a/packages/react-query/src/Available.tsx +++ b/packages/react-query/src/Available.tsx @@ -11,12 +11,12 @@ import React from 'react'; import { formatBalance } from '@polkadot/util'; import { withCalls } from '@polkadot/react-api'; -type Props = BareProps & CallProps & { +interface Props extends BareProps, CallProps { balances_all?: DerivedBalances; children?: React.ReactNode; label?: React.ReactNode; params?: AccountId | AccountIndex | Address | string | Uint8Array | null; -}; +} export class AvailableDisplay extends React.PureComponent { public render (): React.ReactNode { diff --git a/packages/react-query/src/Balance.tsx b/packages/react-query/src/Balance.tsx index b5bf64b314..c3dafbce15 100644 --- a/packages/react-query/src/Balance.tsx +++ b/packages/react-query/src/Balance.tsx @@ -12,12 +12,12 @@ import React from 'react'; import { withCalls } from '@polkadot/react-api'; import { formatBalance } from '@polkadot/util'; -type Props = BareProps & CallProps & { +interface Props extends BareProps, CallProps { children?: React.ReactNode; label?: React.ReactNode; params?: AccountId | AccountIndex | Address | string | Uint8Array | null; balances_all?: DerivedBalances; -}; +} export class BalanceDisplay extends React.PureComponent { public render (): React.ReactNode { diff --git a/packages/react-query/src/BestFinalized.tsx b/packages/react-query/src/BestFinalized.tsx index ba9d2ea7b2..127e7e6995 100644 --- a/packages/react-query/src/BestFinalized.tsx +++ b/packages/react-query/src/BestFinalized.tsx @@ -10,11 +10,11 @@ import React from 'react'; import { withCalls } from '@polkadot/react-api'; import { formatNumber } from '@polkadot/util'; -type Props = BareProps & CallProps & { +interface Props extends BareProps, CallProps { children?: React.ReactNode; label?: React.ReactNode; chain_bestNumberFinalized?: BlockNumber; -}; +} export class BestFinalized extends React.PureComponent { public render (): React.ReactNode { diff --git a/packages/react-query/src/BestNumber.tsx b/packages/react-query/src/BestNumber.tsx index 8a3d3e3a38..decbfd3139 100644 --- a/packages/react-query/src/BestNumber.tsx +++ b/packages/react-query/src/BestNumber.tsx @@ -10,11 +10,11 @@ import React from 'react'; import { withCalls } from '@polkadot/react-api'; import { formatNumber } from '@polkadot/util'; -type Props = BareProps & CallProps & { +interface Props extends BareProps, CallProps { children?: React.ReactNode; label?: React.ReactNode; chain_bestNumber?: BlockNumber; -}; +} export class BestNumber extends React.PureComponent { public render (): React.ReactNode { diff --git a/packages/react-query/src/Bonded.tsx b/packages/react-query/src/Bonded.tsx index 6911d0219c..0b2756de0d 100644 --- a/packages/react-query/src/Bonded.tsx +++ b/packages/react-query/src/Bonded.tsx @@ -11,12 +11,12 @@ import React from 'react'; import { withCalls } from '@polkadot/react-api'; import { formatBalance } from '@polkadot/util'; -type Props = BareProps & CallProps & { +interface Props extends BareProps, CallProps { children?: React.ReactNode; params?: AccountId | AccountIndex | Address | string | Uint8Array | null; label?: React.ReactNode; staking_ledger?: StakingLedger | null; -}; +} export class BondedDisplay extends React.PureComponent { public render (): React.ReactNode { diff --git a/packages/react-query/src/Chain.tsx b/packages/react-query/src/Chain.tsx index 8133971026..756bff8f3b 100644 --- a/packages/react-query/src/Chain.tsx +++ b/packages/react-query/src/Chain.tsx @@ -9,11 +9,11 @@ import React from 'react'; import { Text } from '@polkadot/types'; import { withCalls } from '@polkadot/react-api'; -type Props = BareProps & CallProps & { +interface Props extends BareProps, CallProps { children?: React.ReactNode; label?: React.ReactNode; system_chain?: Text; -}; +} export class Chain extends React.PureComponent { public render (): React.ReactNode { diff --git a/packages/react-query/src/NodeName.tsx b/packages/react-query/src/NodeName.tsx index 3d940b5d8d..20839be6c3 100644 --- a/packages/react-query/src/NodeName.tsx +++ b/packages/react-query/src/NodeName.tsx @@ -9,11 +9,11 @@ import React from 'react'; import { Text } from '@polkadot/types'; import { withCalls } from '@polkadot/react-api'; -type Props = BareProps & CallProps & { +interface Props extends BareProps, CallProps { children?: React.ReactNode; label?: React.ReactNode; system_name?: Text; -}; +} export class NodeName extends React.PureComponent { public render (): React.ReactNode { diff --git a/packages/react-query/src/NodeVersion.tsx b/packages/react-query/src/NodeVersion.tsx index 32eedccc4d..2d41aa64eb 100644 --- a/packages/react-query/src/NodeVersion.tsx +++ b/packages/react-query/src/NodeVersion.tsx @@ -9,11 +9,11 @@ import React from 'react'; import { Text } from '@polkadot/types'; import { withCalls } from '@polkadot/react-api'; -type Props = BareProps & CallProps & { +interface Props extends BareProps, CallProps { children?: React.ReactNode; label?: React.ReactNode; system_version?: Text; -}; +} export class NodeVersion extends React.PureComponent { public render (): React.ReactNode { diff --git a/packages/react-query/src/Nonce.tsx b/packages/react-query/src/Nonce.tsx index 6f0649d7e5..baef526fa7 100644 --- a/packages/react-query/src/Nonce.tsx +++ b/packages/react-query/src/Nonce.tsx @@ -10,13 +10,13 @@ import React from 'react'; import { formatNumber } from '@polkadot/util'; import { withCalls } from '@polkadot/react-api'; -type Props = BareProps & CallProps & { +interface Props extends BareProps, CallProps { accountNonce?: BN; callOnResult?: (accountNonce: BN) => void; children?: React.ReactNode; label?: React.ReactNode; params?: string; -}; +} export class Nonce extends React.PureComponent { public render (): React.ReactNode { diff --git a/packages/react-query/src/TimeNow.tsx b/packages/react-query/src/TimeNow.tsx index bbd2dd524a..dbc2ee21d2 100644 --- a/packages/react-query/src/TimeNow.tsx +++ b/packages/react-query/src/TimeNow.tsx @@ -11,11 +11,11 @@ import { withCalls } from '@polkadot/react-api'; import Elapsed from './Elapsed'; -type Props = BareProps & CallProps & { +interface Props extends BareProps, CallProps { children?: React.ReactNode; label?: React.ReactNode; timestamp_now?: Moment; -}; +} export class TimeNow extends React.PureComponent { public render (): React.ReactNode { diff --git a/packages/react-query/src/TimePeriod.tsx b/packages/react-query/src/TimePeriod.tsx index 688eb97c41..ceb9ca927a 100644 --- a/packages/react-query/src/TimePeriod.tsx +++ b/packages/react-query/src/TimePeriod.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { withCalls } from '@polkadot/react-api'; import { formatNumber } from '@polkadot/util'; -type Props = BareProps & CallProps & { +interface Props extends BareProps, CallProps { babe_expectedBlockTime?: Moment; children?: React.ReactNode; label?: React.ReactNode; diff --git a/packages/react-query/src/TotalIssuance.tsx b/packages/react-query/src/TotalIssuance.tsx index d0de2d0dcb..b208842823 100644 --- a/packages/react-query/src/TotalIssuance.tsx +++ b/packages/react-query/src/TotalIssuance.tsx @@ -10,11 +10,11 @@ import React from 'react'; import { withCalls } from '@polkadot/react-api'; import { formatBalance } from '@polkadot/util'; -type Props = BareProps & CallProps & { +interface Props extends BareProps, CallProps { children?: React.ReactNode; label?: React.ReactNode; balances_totalIssuance?: Balance; -}; +} export class TotalIssuance extends React.PureComponent { public render (): React.ReactNode {