diff --git a/packages/apps-config/src/api/bundle/spec/acala.ts b/packages/apps-config/src/api/bundle/spec/acala.ts index 26cfaf6956..8145d31c10 100644 --- a/packages/apps-config/src/api/bundle/spec/acala.ts +++ b/packages/apps-config/src/api/bundle/spec/acala.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { OverrideBundleDefinition } from '@polkadot/types/types'; +import type { OverrideBundleDefinition } from '@polkadot/types/types'; import { typesBundleForPolkadot } from '@acala-network/type-definitions'; diff --git a/packages/apps-config/src/api/bundle/spec/laminar.ts b/packages/apps-config/src/api/bundle/spec/laminar.ts index d20b6e01ca..33e4722f32 100644 --- a/packages/apps-config/src/api/bundle/spec/laminar.ts +++ b/packages/apps-config/src/api/bundle/spec/laminar.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { OverrideBundleDefinition } from '@polkadot/types/types'; +import type { OverrideBundleDefinition } from '@polkadot/types/types'; import { typesBundleForPolkadot } from '@laminar/type-definitions'; diff --git a/packages/apps-config/src/api/rpc/moonbeam.ts b/packages/apps-config/src/api/rpc/moonbeam.ts index 4210d42c99..c4f60ec17a 100644 --- a/packages/apps-config/src/api/rpc/moonbeam.ts +++ b/packages/apps-config/src/api/rpc/moonbeam.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DefinitionRpc, DefinitionRpcParam } from '@polkadot/types/types'; +import type { DefinitionRpc, DefinitionRpcParam } from '@polkadot/types/types'; export default function (): Record> { function generateDescription (description:string, returnType:string, params:DefinitionRpcParam[] = []):DefinitionRpc { diff --git a/packages/apps-config/src/links/index.ts b/packages/apps-config/src/links/index.ts index cfb5d0476e..94e1ca6f5d 100644 --- a/packages/apps-config/src/links/index.ts +++ b/packages/apps-config/src/links/index.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ExternalDef } from './types'; +import type { ExternalDef } from './types'; import Commonwealth from './commonwealth'; import Polkascan from './polkascan'; diff --git a/packages/apps-config/src/settings/endpoints.ts b/packages/apps-config/src/settings/endpoints.ts index cd852d8464..7e7f169aa3 100644 --- a/packages/apps-config/src/settings/endpoints.ts +++ b/packages/apps-config/src/settings/endpoints.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { LinkOption } from './types'; +import type { LinkOption } from './types'; import { CUSTOM_ENDPOINT_KEY } from './constants'; diff --git a/packages/apps-config/src/settings/languages.ts b/packages/apps-config/src/settings/languages.ts index 1b01983228..66b93be6d7 100644 --- a/packages/apps-config/src/settings/languages.ts +++ b/packages/apps-config/src/settings/languages.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Option } from './types'; +import type { Option } from './types'; export function createLanguages (t: TFunction): Option[] { return [ diff --git a/packages/apps-config/src/settings/ss58.ts b/packages/apps-config/src/settings/ss58.ts index 388ffaa9f9..73b8215bff 100644 --- a/packages/apps-config/src/settings/ss58.ts +++ b/packages/apps-config/src/settings/ss58.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Option } from './types'; +import type { Option } from './types'; import known from '@polkadot/networks'; diff --git a/packages/apps-electron/src/api/account-store-api.ts b/packages/apps-electron/src/api/account-store-api.ts index 2ec6415679..fc0ea92bae 100644 --- a/packages/apps-electron/src/api/account-store-api.ts +++ b/packages/apps-electron/src/api/account-store-api.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeyringJson } from '@polkadot/ui-keyring/types'; +import type { KeyringJson } from '@polkadot/ui-keyring/types'; export interface AccountStoreApi { all: () => Promise<{ key: string, value: KeyringJson }[]> diff --git a/packages/apps-electron/src/main/account-store.spec.ts b/packages/apps-electron/src/main/account-store.spec.ts index aae3d090b0..d82e104531 100644 --- a/packages/apps-electron/src/main/account-store.spec.ts +++ b/packages/apps-electron/src/main/account-store.spec.ts @@ -1,11 +1,13 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { FileStore } from '@polkadot/ui-keyring/stores'; -import { accountStoreIpcHandler } from './account-store'; -import { KeyringJson } from '@polkadot/ui-keyring/types'; -import { IpcMainHandler } from './ipc-main-handler'; +import type { KeyringJson } from '@polkadot/ui-keyring/types'; + import * as tmp from 'tmp'; +import { FileStore } from '@polkadot/ui-keyring/stores'; + +import { accountStoreIpcHandler } from './account-store'; +import { IpcMainHandler } from './ipc-main-handler'; const exampleAccount = (address: string): KeyringJson => ({ address, diff --git a/packages/apps-electron/src/main/account-store.ts b/packages/apps-electron/src/main/account-store.ts index 3169ec686f..3c115bd184 100644 --- a/packages/apps-electron/src/main/account-store.ts +++ b/packages/apps-electron/src/main/account-store.ts @@ -1,10 +1,11 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { KeyringJson } from '@polkadot/ui-keyring/types'; + import { app } from 'electron'; -import { FileStore } from '@polkadot/ui-keyring/stores'; -import { KeyringJson } from '@polkadot/ui-keyring/types'; import path from 'path'; +import { FileStore } from '@polkadot/ui-keyring/stores'; import { IpcMainHandler } from './ipc-main-handler'; import { registerIpcHandler } from './register-ipc-handler'; diff --git a/packages/apps-electron/src/preload.ts b/packages/apps-electron/src/preload.ts index d8c108e8a7..df48975c91 100644 --- a/packages/apps-electron/src/preload.ts +++ b/packages/apps-electron/src/preload.ts @@ -1,7 +1,8 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeyringJson } from '@polkadot/ui-keyring/types'; +import type { KeyringJson } from '@polkadot/ui-keyring/types'; + import { contextBridge, ipcRenderer } from 'electron'; contextBridge.exposeInMainWorld('ElectronMain', { diff --git a/packages/apps-electron/src/renderer/remote-electron-store.ts b/packages/apps-electron/src/renderer/remote-electron-store.ts index 4de3e4f3d5..859b29f1a3 100644 --- a/packages/apps-electron/src/renderer/remote-electron-store.ts +++ b/packages/apps-electron/src/renderer/remote-electron-store.ts @@ -1,7 +1,8 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeyringJson, KeyringStore } from '@polkadot/ui-keyring/types'; +import type { KeyringJson, KeyringStore } from '@polkadot/ui-keyring/types'; + import { AccountStoreApi } from '../api/account-store-api'; export class RemoteElectronStore implements KeyringStore { diff --git a/packages/apps-routing/src/accounts.ts b/packages/apps-routing/src/accounts.ts index 79c982f321..ca5c2b6cb2 100644 --- a/packages/apps-routing/src/accounts.ts +++ b/packages/apps-routing/src/accounts.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Component, { useCounter } from '@polkadot/app-accounts'; diff --git a/packages/apps-routing/src/addresses.ts b/packages/apps-routing/src/addresses.ts index d74675691e..2170db3253 100644 --- a/packages/apps-routing/src/addresses.ts +++ b/packages/apps-routing/src/addresses.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Component from '@polkadot/app-addresses'; diff --git a/packages/apps-routing/src/calendar.ts b/packages/apps-routing/src/calendar.ts index d6fb2eedbb..f374f6e1ef 100644 --- a/packages/apps-routing/src/calendar.ts +++ b/packages/apps-routing/src/calendar.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Component from '@polkadot/app-calendar'; diff --git a/packages/apps-routing/src/claims.ts b/packages/apps-routing/src/claims.ts index bed7f4123f..2b69bf6e40 100644 --- a/packages/apps-routing/src/claims.ts +++ b/packages/apps-routing/src/claims.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Component, { useCounter } from '@polkadot/app-claims'; diff --git a/packages/apps-routing/src/contracts.ts b/packages/apps-routing/src/contracts.ts index 863312b986..09b8d23652 100644 --- a/packages/apps-routing/src/contracts.ts +++ b/packages/apps-routing/src/contracts.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Component from '@polkadot/app-contracts'; diff --git a/packages/apps-routing/src/council.ts b/packages/apps-routing/src/council.ts index 3d1ede61fa..ac70cf9d7c 100644 --- a/packages/apps-routing/src/council.ts +++ b/packages/apps-routing/src/council.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Component, { useCounter } from '@polkadot/app-council'; diff --git a/packages/apps-routing/src/democracy.ts b/packages/apps-routing/src/democracy.ts index c0bc9c77aa..8e1c35936e 100644 --- a/packages/apps-routing/src/democracy.ts +++ b/packages/apps-routing/src/democracy.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Component, { useCounter } from '@polkadot/app-democracy'; diff --git a/packages/apps-routing/src/explorer.ts b/packages/apps-routing/src/explorer.ts index 1691813bfa..656364ef22 100644 --- a/packages/apps-routing/src/explorer.ts +++ b/packages/apps-routing/src/explorer.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Component from '@polkadot/app-explorer'; diff --git a/packages/apps-routing/src/extrinsics.ts b/packages/apps-routing/src/extrinsics.ts index 3e53979a6a..e740f17962 100644 --- a/packages/apps-routing/src/extrinsics.ts +++ b/packages/apps-routing/src/extrinsics.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Component from '@polkadot/app-extrinsics'; diff --git a/packages/apps-routing/src/generic-asset.ts b/packages/apps-routing/src/generic-asset.ts index 1478ccec84..f32fc21670 100644 --- a/packages/apps-routing/src/generic-asset.ts +++ b/packages/apps-routing/src/generic-asset.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Component from '@polkadot/app-generic-asset'; diff --git a/packages/apps-routing/src/index.ts b/packages/apps-routing/src/index.ts index c214491fd1..bd030bbdb8 100644 --- a/packages/apps-routing/src/index.ts +++ b/packages/apps-routing/src/index.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Routes } from './types'; +import type { Routes } from './types'; import accounts from './accounts'; import addresses from './addresses'; diff --git a/packages/apps-routing/src/js.ts b/packages/apps-routing/src/js.ts index 63394821d9..bc9447a674 100644 --- a/packages/apps-routing/src/js.ts +++ b/packages/apps-routing/src/js.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Component from '@polkadot/app-js'; diff --git a/packages/apps-routing/src/parachains.ts b/packages/apps-routing/src/parachains.ts index 5adcdf1ed5..6811dd22d0 100644 --- a/packages/apps-routing/src/parachains.ts +++ b/packages/apps-routing/src/parachains.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Component from '@polkadot/app-parachains'; diff --git a/packages/apps-routing/src/poll.ts b/packages/apps-routing/src/poll.ts index 8358c76551..cdce254f32 100644 --- a/packages/apps-routing/src/poll.ts +++ b/packages/apps-routing/src/poll.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Component from '@polkadot/app-poll'; diff --git a/packages/apps-routing/src/rpc.ts b/packages/apps-routing/src/rpc.ts index c58f1d8fd1..89d4f9721e 100644 --- a/packages/apps-routing/src/rpc.ts +++ b/packages/apps-routing/src/rpc.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Component from '@polkadot/app-rpc'; diff --git a/packages/apps-routing/src/settings.ts b/packages/apps-routing/src/settings.ts index 4a8503a978..44b0a7874d 100644 --- a/packages/apps-routing/src/settings.ts +++ b/packages/apps-routing/src/settings.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Component, { useCounter } from '@polkadot/app-settings'; diff --git a/packages/apps-routing/src/signing.ts b/packages/apps-routing/src/signing.ts index db97cd3617..9fe1162605 100644 --- a/packages/apps-routing/src/signing.ts +++ b/packages/apps-routing/src/signing.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Component from '@polkadot/app-signing'; diff --git a/packages/apps-routing/src/society.ts b/packages/apps-routing/src/society.ts index 404e2110c0..53e2420ad8 100644 --- a/packages/apps-routing/src/society.ts +++ b/packages/apps-routing/src/society.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Component, { useCounter } from '@polkadot/app-society'; diff --git a/packages/apps-routing/src/staking.ts b/packages/apps-routing/src/staking.ts index fc690b4bbd..5c945f42f1 100644 --- a/packages/apps-routing/src/staking.ts +++ b/packages/apps-routing/src/staking.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Component from '@polkadot/app-staking'; diff --git a/packages/apps-routing/src/storage.ts b/packages/apps-routing/src/storage.ts index aaa2766212..dfac0cd6e9 100644 --- a/packages/apps-routing/src/storage.ts +++ b/packages/apps-routing/src/storage.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Component from '@polkadot/app-storage'; diff --git a/packages/apps-routing/src/sudo.ts b/packages/apps-routing/src/sudo.ts index 33224817f5..10f795269f 100644 --- a/packages/apps-routing/src/sudo.ts +++ b/packages/apps-routing/src/sudo.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Component from '@polkadot/app-sudo'; diff --git a/packages/apps-routing/src/techcomm.ts b/packages/apps-routing/src/techcomm.ts index 6f2bbab5ea..03ff3fee2f 100644 --- a/packages/apps-routing/src/techcomm.ts +++ b/packages/apps-routing/src/techcomm.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Component, { useCounter } from '@polkadot/app-tech-comm'; diff --git a/packages/apps-routing/src/transfer.ts b/packages/apps-routing/src/transfer.ts index 5b85a8c207..947c93386f 100644 --- a/packages/apps-routing/src/transfer.ts +++ b/packages/apps-routing/src/transfer.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Modal from '@polkadot/app-accounts/modals/Transfer'; diff --git a/packages/apps-routing/src/treasury.ts b/packages/apps-routing/src/treasury.ts index 718956bfb6..454031dadf 100644 --- a/packages/apps-routing/src/treasury.ts +++ b/packages/apps-routing/src/treasury.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { Route } from './types'; +import type { Route } from './types'; import Component, { useCounter } from '@polkadot/app-treasury'; diff --git a/packages/apps-routing/src/types.ts b/packages/apps-routing/src/types.ts index 781c04d7aa..cb56434a54 100644 --- a/packages/apps-routing/src/types.ts +++ b/packages/apps-routing/src/types.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { IconName } from '@fortawesome/fontawesome-svg-core'; -import { AppProps, BareProps } from '@polkadot/react-components/types'; +import type { AppProps, BareProps } from '@polkadot/react-components/types'; export type RouteGroup = 'accounts' | 'developer' | 'governance' | 'network' | 'settings'; diff --git a/packages/apps/src/Apps.tsx b/packages/apps/src/Apps.tsx index 85c0614a90..1a3d75f697 100644 --- a/packages/apps/src/Apps.tsx +++ b/packages/apps/src/Apps.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { BareProps as Props, ThemeDef, ThemeProps } from '@polkadot/react-components/types'; +import type { BareProps as Props, ThemeDef, ThemeProps } from '@polkadot/react-components/types'; import React, { useContext, useMemo } from 'react'; import styled, { ThemeContext } from 'styled-components'; diff --git a/packages/apps/src/Content/NotFound.tsx b/packages/apps/src/Content/NotFound.tsx index a912562fcf..d71c19fa77 100644 --- a/packages/apps/src/Content/NotFound.tsx +++ b/packages/apps/src/Content/NotFound.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { RouteProps } from '@polkadot/apps-routing/types'; +import type { RouteProps } from '@polkadot/apps-routing/types'; import React from 'react'; import { Redirect } from 'react-router'; diff --git a/packages/apps/src/Content/Status.tsx b/packages/apps/src/Content/Status.tsx index 1a7ea30a10..9fed67c9c0 100644 --- a/packages/apps/src/Content/Status.tsx +++ b/packages/apps/src/Content/Status.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { EventRecord } from '@polkadot/types/interfaces'; -import { KeyringOptions } from '@polkadot/ui-keyring/options/types'; -import { ActionStatus } from '@polkadot/react-components/Status/types'; +import type { EventRecord } from '@polkadot/types/interfaces'; +import type { KeyringOptions } from '@polkadot/ui-keyring/options/types'; +import type { ActionStatus } from '@polkadot/react-components/Status/types'; import React, { useContext, useEffect } from 'react'; import { Status as StatusDisplay, StatusContext } from '@polkadot/react-components'; diff --git a/packages/apps/src/Content/index.tsx b/packages/apps/src/Content/index.tsx index bf4410b322..c8dbc75869 100644 --- a/packages/apps/src/Content/index.tsx +++ b/packages/apps/src/Content/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Route } from '@polkadot/apps-routing/types'; +import type { Route } from '@polkadot/apps-routing/types'; import React, { Suspense, useContext, useMemo } from 'react'; import { useLocation } from 'react-router-dom'; diff --git a/packages/apps/src/Endpoints/Group.tsx b/packages/apps/src/Endpoints/Group.tsx index 139ba1e29e..9b8215a946 100644 --- a/packages/apps/src/Endpoints/Group.tsx +++ b/packages/apps/src/Endpoints/Group.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeProps } from '@polkadot/react-components/types'; -import { Group } from './types'; +import type { ThemeProps } from '@polkadot/react-components/types'; +import type { Group } from './types'; import React, { useCallback } from 'react'; import styled from 'styled-components'; diff --git a/packages/apps/src/Endpoints/Network.tsx b/packages/apps/src/Endpoints/Network.tsx index 85b1d9b340..14ba8daf27 100644 --- a/packages/apps/src/Endpoints/Network.tsx +++ b/packages/apps/src/Endpoints/Network.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeProps } from '@polkadot/react-components/types'; -import { Network } from './types'; +import type { ThemeProps } from '@polkadot/react-components/types'; +import type { Network } from './types'; import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; diff --git a/packages/apps/src/Endpoints/index.tsx b/packages/apps/src/Endpoints/index.tsx index 5f7f36050c..f9161a878e 100644 --- a/packages/apps/src/Endpoints/index.tsx +++ b/packages/apps/src/Endpoints/index.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { LinkOption } from '@polkadot/apps-config/settings/types'; -import { ThemeProps } from '@polkadot/react-components/types'; -import { Group } from './types'; +import type { LinkOption } from '@polkadot/apps-config/settings/types'; +import type { ThemeProps } from '@polkadot/react-components/types'; +import type { Group } from './types'; import React, { useCallback, useMemo, useState } from 'react'; // ok, this seems to be an eslint bug, this _is_ a package import diff --git a/packages/apps/src/Menu/Grouping.tsx b/packages/apps/src/Menu/Grouping.tsx index 50148cfab2..eae2df013e 100644 --- a/packages/apps/src/Menu/Grouping.tsx +++ b/packages/apps/src/Menu/Grouping.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeProps } from '@polkadot/react-components/types'; -import { Group } from './types'; +import type { ThemeProps } from '@polkadot/react-components/types'; +import type { Group } from './types'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/apps/src/Menu/Item.tsx b/packages/apps/src/Menu/Item.tsx index 5c6c43c34a..2f6b864dab 100644 --- a/packages/apps/src/Menu/Item.tsx +++ b/packages/apps/src/Menu/Item.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ItemRoute } from './types'; +import type { ItemRoute } from './types'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/apps/src/Menu/NodeInfo.tsx b/packages/apps/src/Menu/NodeInfo.tsx index edad74dafc..c2c8ed49aa 100644 --- a/packages/apps/src/Menu/NodeInfo.tsx +++ b/packages/apps/src/Menu/NodeInfo.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { BareProps as Props } from '@polkadot/react-components/types'; +import type { BareProps as Props } from '@polkadot/react-components/types'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/apps/src/Menu/index.tsx b/packages/apps/src/Menu/index.tsx index 9b0ed5f198..5a90fe81b9 100644 --- a/packages/apps/src/Menu/index.tsx +++ b/packages/apps/src/Menu/index.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Route, Routes } from '@polkadot/apps-routing/types'; -import { ApiProps } from '@polkadot/react-api/types'; -import { ThemeProps } from '@polkadot/react-components/types'; -import { AccountId } from '@polkadot/types/interfaces'; -import { Group, Groups, ItemRoute } from './types'; +import type { Route, Routes } from '@polkadot/apps-routing/types'; +import type { ApiProps } from '@polkadot/react-api/types'; +import type { ThemeProps } from '@polkadot/react-components/types'; +import type { AccountId } from '@polkadot/types/interfaces'; +import type { Group, Groups, ItemRoute } from './types'; import type { TFunction } from 'i18next'; import React, { useMemo, useRef } from 'react'; diff --git a/packages/apps/src/Menu/types.tsx b/packages/apps/src/Menu/types.tsx index 8494a379c3..7bed75e1db 100644 --- a/packages/apps/src/Menu/types.tsx +++ b/packages/apps/src/Menu/types.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { IconName } from '@fortawesome/fontawesome-svg-core'; -import { Routes } from '@polkadot/apps-routing/types'; +import type { Routes } from '@polkadot/apps-routing/types'; import React from 'react'; diff --git a/packages/apps/src/Root.tsx b/packages/apps/src/Root.tsx index 3d7448f576..6b6af836fe 100644 --- a/packages/apps/src/Root.tsx +++ b/packages/apps/src/Root.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeDef } from '@polkadot/react-components/types'; -import { KeyringStore } from '@polkadot/ui-keyring/types'; +import type { ThemeDef } from '@polkadot/react-components/types'; +import type { KeyringStore } from '@polkadot/ui-keyring/types'; import React, { Suspense, useEffect, useState } from 'react'; import { ThemeProvider } from 'styled-components'; diff --git a/packages/apps/src/overlays/Base.tsx b/packages/apps/src/overlays/Base.tsx index dd24f6c8fe..72f4d2cb9a 100644 --- a/packages/apps/src/overlays/Base.tsx +++ b/packages/apps/src/overlays/Base.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeProps } from '@polkadot/react-components/types'; +import type { ThemeProps } from '@polkadot/react-components/types'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/apps/src/themes.ts b/packages/apps/src/themes.ts index f863753232..318e2c0f01 100644 --- a/packages/apps/src/themes.ts +++ b/packages/apps/src/themes.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeDef } from '@polkadot/react-components/types'; +import type { ThemeDef } from '@polkadot/react-components/types'; // Suggested '"Nunito Sans", sans-serif', however there are a couple of issues // - alignment of identities are way off, parent + sub + unicode diff --git a/packages/page-accounts/src/Accounts/Account.tsx b/packages/page-accounts/src/Accounts/Account.tsx index d9d8a06682..d6c9d77003 100644 --- a/packages/page-accounts/src/Accounts/Account.tsx +++ b/packages/page-accounts/src/Accounts/Account.tsx @@ -1,13 +1,14 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; -import { DeriveBalancesAll, DeriveDemocracyLock } from '@polkadot/api-derive/types'; -import { ActionStatus } from '@polkadot/react-components/Status/types'; -import { ThemeDef } from '@polkadot/react-components/types'; -import { ProxyDefinition, RecoveryConfig } from '@polkadot/types/interfaces'; -import { KeyringAddress } from '@polkadot/ui-keyring/types'; -import { Delegation } from '../types'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { DeriveBalancesAll, DeriveDemocracyLock } from '@polkadot/api-derive/types'; +import type { ActionStatus } from '@polkadot/react-components/Status/types'; +import type { ThemeDef } from '@polkadot/react-components/types'; +import type { Option } from '@polkadot/types'; +import type { ProxyDefinition, RecoveryConfig } from '@polkadot/types/interfaces'; +import type { KeyringAddress } from '@polkadot/ui-keyring/types'; +import type { Delegation } from '../types'; import BN from 'bn.js'; import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react'; @@ -16,7 +17,6 @@ import { ApiPromise } from '@polkadot/api'; import { getLedger } from '@polkadot/react-api'; import { AddressInfo, AddressMini, AddressSmall, Badge, Button, ChainLock, CryptoType, Forget, Icon, IdentityIcon, LinkExternal, Menu, Popup, StatusContext, Tags } from '@polkadot/react-components'; import { useAccountInfo, useApi, useCall, useToggle } from '@polkadot/react-hooks'; -import { Option } from '@polkadot/types'; import keyring from '@polkadot/ui-keyring'; import { BN_ZERO, formatBalance, formatNumber } from '@polkadot/util'; diff --git a/packages/page-accounts/src/Accounts/index.tsx b/packages/page-accounts/src/Accounts/index.tsx index b0de88a471..430ab4aab5 100644 --- a/packages/page-accounts/src/Accounts/index.tsx +++ b/packages/page-accounts/src/Accounts/index.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ActionStatus } from '@polkadot/react-components/Status/types'; -import { AccountId, ProxyDefinition, ProxyType, Voting } from '@polkadot/types/interfaces'; -import { Delegation, SortedAccount } from '../types'; +import type { ActionStatus } from '@polkadot/react-components/Status/types'; +import type { AccountId, ProxyDefinition, ProxyType, Voting } from '@polkadot/types/interfaces'; +import type { Delegation, SortedAccount } from '../types'; import BN from 'bn.js'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; diff --git a/packages/page-accounts/src/Accounts/types.ts b/packages/page-accounts/src/Accounts/types.ts index b5d7c0b2ae..93b8071033 100644 --- a/packages/page-accounts/src/Accounts/types.ts +++ b/packages/page-accounts/src/Accounts/types.ts @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ActionStatus } from '@polkadot/react-components/Status/types'; -import { KeyringAddress } from '@polkadot/ui-keyring/types'; +import type { ActionStatus } from '@polkadot/react-components/Status/types'; +import type { KeyringAddress } from '@polkadot/ui-keyring/types'; import { WithTranslation } from 'react-i18next'; diff --git a/packages/page-accounts/src/Accounts/useMultisigApprovals.ts b/packages/page-accounts/src/Accounts/useMultisigApprovals.ts index 86ec28411e..bcb4572321 100644 --- a/packages/page-accounts/src/Accounts/useMultisigApprovals.ts +++ b/packages/page-accounts/src/Accounts/useMultisigApprovals.ts @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { H256, Multisig } from '@polkadot/types/interfaces'; +import type { Option, StorageKey } from '@polkadot/types'; +import type { H256, Multisig } from '@polkadot/types/interfaces'; import { useContext, useEffect, useState } from 'react'; import { useApi, useIncrement, useIsMountedRef } from '@polkadot/react-hooks'; import { EventsContext } from '@polkadot/react-query'; -import { Option, StorageKey } from '@polkadot/types'; export default function useMultisigApprovals (address: string): [H256, Multisig][] { const events = useContext(EventsContext); diff --git a/packages/page-accounts/src/Accounts/useProxies.ts b/packages/page-accounts/src/Accounts/useProxies.ts index ae2ce60e60..ef7a221699 100644 --- a/packages/page-accounts/src/Accounts/useProxies.ts +++ b/packages/page-accounts/src/Accounts/useProxies.ts @@ -1,13 +1,13 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, BalanceOf, ProxyDefinition, ProxyType } from '@polkadot/types/interfaces'; -import { ITuple } from '@polkadot/types/types'; +import type { Vec } from '@polkadot/types'; +import type { AccountId, BalanceOf, ProxyDefinition, ProxyType } from '@polkadot/types/interfaces'; +import type { ITuple } from '@polkadot/types/types'; import BN from 'bn.js'; import { useEffect, useState } from 'react'; import { useAccounts, useApi, useIsMountedRef } from '@polkadot/react-hooks'; -import { Vec } from '@polkadot/types'; import { BN_ZERO } from '@polkadot/util'; interface Proxy { diff --git a/packages/page-accounts/src/Sidebar/Flags.tsx b/packages/page-accounts/src/Sidebar/Flags.tsx index 6259e583f6..ed4eb3faff 100644 --- a/packages/page-accounts/src/Sidebar/Flags.tsx +++ b/packages/page-accounts/src/Sidebar/Flags.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AddressFlags } from '@polkadot/react-hooks/types'; +import type { AddressFlags } from '@polkadot/react-hooks/types'; import React from 'react'; import { Tag } from '@polkadot/react-components'; diff --git a/packages/page-accounts/src/Sidebar/Identity.tsx b/packages/page-accounts/src/Sidebar/Identity.tsx index 55f314e7b8..4f5c59fd21 100644 --- a/packages/page-accounts/src/Sidebar/Identity.tsx +++ b/packages/page-accounts/src/Sidebar/Identity.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AddressIdentity } from '@polkadot/react-hooks/types'; -import { AccountId, BalanceOf } from '@polkadot/types/interfaces'; +import type { AddressIdentity } from '@polkadot/react-hooks/types'; +import type { AccountId, BalanceOf } from '@polkadot/types/interfaces'; import React from 'react'; import { AddressMini, AvatarItem, Expander, Icon, IconLink, Tag } from '@polkadot/react-components'; diff --git a/packages/page-accounts/src/Sidebar/Multisig.tsx b/packages/page-accounts/src/Sidebar/Multisig.tsx index 778e2c7a92..5cb445088a 100644 --- a/packages/page-accounts/src/Sidebar/Multisig.tsx +++ b/packages/page-accounts/src/Sidebar/Multisig.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeyringJson$Meta } from '@polkadot/ui-keyring/types'; +import type { KeyringJson$Meta } from '@polkadot/ui-keyring/types'; import React from 'react'; import { AddressMini, Icon, Static } from '@polkadot/react-components'; diff --git a/packages/page-accounts/src/Sidebar/Sidebar.tsx b/packages/page-accounts/src/Sidebar/Sidebar.tsx index 6c91d348aa..bf80905e85 100644 --- a/packages/page-accounts/src/Sidebar/Sidebar.tsx +++ b/packages/page-accounts/src/Sidebar/Sidebar.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeProps } from '@polkadot/react-components/types'; +import type { ThemeProps } from '@polkadot/react-components/types'; import React, { useCallback } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-accounts/src/Sidebar/index.tsx b/packages/page-accounts/src/Sidebar/index.tsx index fc614ee8ab..7e89a0c574 100644 --- a/packages/page-accounts/src/Sidebar/index.tsx +++ b/packages/page-accounts/src/Sidebar/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { StringOrNull, VoidFn } from '@polkadot/react-components/types'; +import type { StringOrNull, VoidFn } from '@polkadot/react-components/types'; import React, { useCallback, useState } from 'react'; diff --git a/packages/page-accounts/src/Vanity/Match.tsx b/packages/page-accounts/src/Vanity/Match.tsx index a754455e88..5389793425 100644 --- a/packages/page-accounts/src/Vanity/Match.tsx +++ b/packages/page-accounts/src/Vanity/Match.tsx @@ -1,8 +1,9 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { ThemeProps } from '@polkadot/react-components/types'; + import React, { useCallback, useMemo } from 'react'; -import { ThemeProps } from '@polkadot/react-components/types'; import styled from 'styled-components'; import { Button, IdentityIcon } from '@polkadot/react-components'; import { u8aToHex } from '@polkadot/util'; diff --git a/packages/page-accounts/src/Vanity/index.tsx b/packages/page-accounts/src/Vanity/index.tsx index 625068349e..6622181a4c 100644 --- a/packages/page-accounts/src/Vanity/index.tsx +++ b/packages/page-accounts/src/Vanity/index.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ActionStatus } from '@polkadot/react-components/Status/types'; -import { KeypairType } from '@polkadot/util-crypto/types'; -import { GeneratorMatches, GeneratorMatch, GeneratorResult } from '@polkadot/vanitygen/types'; +import type { ActionStatus } from '@polkadot/react-components/Status/types'; +import type { KeypairType } from '@polkadot/util-crypto/types'; +import type { GeneratorMatches, GeneratorMatch, GeneratorResult } from '@polkadot/vanitygen/types'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-accounts/src/index.tsx b/packages/page-accounts/src/index.tsx index 76ff8172b0..c5869a41c2 100644 --- a/packages/page-accounts/src/index.tsx +++ b/packages/page-accounts/src/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AppProps as Props } from '@polkadot/react-components/types'; +import type { AppProps as Props } from '@polkadot/react-components/types'; import React, { useRef } from 'react'; import { Route, Switch } from 'react-router'; diff --git a/packages/page-accounts/src/modals/Create.tsx b/packages/page-accounts/src/modals/Create.tsx index 6eeba77904..7931e2d8a9 100644 --- a/packages/page-accounts/src/modals/Create.tsx +++ b/packages/page-accounts/src/modals/Create.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ActionStatus } from '@polkadot/react-components/Status/types'; -import { CreateResult } from '@polkadot/ui-keyring/types'; -import { KeypairType } from '@polkadot/util-crypto/types'; -import { ModalProps } from '../types'; +import type { ActionStatus } from '@polkadot/react-components/Status/types'; +import type { CreateResult } from '@polkadot/ui-keyring/types'; +import type { KeypairType } from '@polkadot/util-crypto/types'; +import type { ModalProps } from '../types'; import FileSaver from 'file-saver'; import React, { useCallback, useMemo, useState } from 'react'; diff --git a/packages/page-accounts/src/modals/CreateConfirmation.tsx b/packages/page-accounts/src/modals/CreateConfirmation.tsx index 4e2a4d9ff6..9cd47cc876 100644 --- a/packages/page-accounts/src/modals/CreateConfirmation.tsx +++ b/packages/page-accounts/src/modals/CreateConfirmation.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeypairType } from '@polkadot/util-crypto/types'; +import type { KeypairType } from '@polkadot/util-crypto/types'; import React from 'react'; import { AddressRow, Modal, Static } from '@polkadot/react-components'; diff --git a/packages/page-accounts/src/modals/Delegate.tsx b/packages/page-accounts/src/modals/Delegate.tsx index 26f90796f2..80ebb3779b 100644 --- a/packages/page-accounts/src/modals/Delegate.tsx +++ b/packages/page-accounts/src/modals/Delegate.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AmountValidateState } from '../Accounts/types'; +import type { AmountValidateState } from '../Accounts/types'; import BN from 'bn.js'; import React, { useState } from 'react'; diff --git a/packages/page-accounts/src/modals/Derive.tsx b/packages/page-accounts/src/modals/Derive.tsx index ceaa198dbf..2ed74cbdae 100644 --- a/packages/page-accounts/src/modals/Derive.tsx +++ b/packages/page-accounts/src/modals/Derive.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeyringPair } from '@polkadot/keyring/types'; -import { ActionStatus } from '@polkadot/react-components/Status/types'; -import { KeypairType } from '@polkadot/util-crypto/types'; +import type { KeyringPair } from '@polkadot/keyring/types'; +import type { ActionStatus } from '@polkadot/react-components/Status/types'; +import type { KeypairType } from '@polkadot/util-crypto/types'; import React, { useCallback, useContext, useEffect, useState } from 'react'; import { AddressRow, Button, Input, InputAddress, Modal, Password, StatusContext } from '@polkadot/react-components'; diff --git a/packages/page-accounts/src/modals/IdentityMain.tsx b/packages/page-accounts/src/modals/IdentityMain.tsx index c9d32891c9..def103e89d 100644 --- a/packages/page-accounts/src/modals/IdentityMain.tsx +++ b/packages/page-accounts/src/modals/IdentityMain.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Registration } from '@polkadot/types/interfaces'; +import type { Data, Option } from '@polkadot/types'; +import type { Registration } from '@polkadot/types/interfaces'; import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; import { Input, InputBalance, Modal, Toggle, TxButton } from '@polkadot/react-components'; import { getAddressMeta } from '@polkadot/react-components/util'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { Data, Option } from '@polkadot/types'; import { u8aToString } from '@polkadot/util'; import { useTranslation } from '../translate'; diff --git a/packages/page-accounts/src/modals/IdentitySub.tsx b/packages/page-accounts/src/modals/IdentitySub.tsx index 0356193fe0..994b331bbb 100644 --- a/packages/page-accounts/src/modals/IdentitySub.tsx +++ b/packages/page-accounts/src/modals/IdentitySub.tsx @@ -1,13 +1,13 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, Balance } from '@polkadot/types/interfaces'; -import { ITuple } from '@polkadot/types/types'; +import type { Data, Option, Vec } from '@polkadot/types'; +import type { AccountId, Balance } from '@polkadot/types/interfaces'; +import type { ITuple } from '@polkadot/types/types'; import React, { useCallback, useEffect, useState } from 'react'; import { Button, Columar, Input, InputAddress, Modal, Spinner, TxButton } from '@polkadot/react-components'; import { useAccounts, useApi, useCall } from '@polkadot/react-hooks'; -import { Data, Option, Vec } from '@polkadot/types'; import { u8aToString } from '@polkadot/util'; import { useTranslation } from '../translate'; diff --git a/packages/page-accounts/src/modals/Import.tsx b/packages/page-accounts/src/modals/Import.tsx index 86516d00a6..39ef11638b 100644 --- a/packages/page-accounts/src/modals/Import.tsx +++ b/packages/page-accounts/src/modals/Import.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeyringPair, KeyringPair$Json } from '@polkadot/keyring/types'; -import { ActionStatus } from '@polkadot/react-components/Status/types'; -import { ModalProps } from '../types'; +import type { KeyringPair, KeyringPair$Json } from '@polkadot/keyring/types'; +import type { ActionStatus } from '@polkadot/react-components/Status/types'; +import type { ModalProps } from '../types'; import React, { useCallback, useMemo, useState } from 'react'; import { AddressRow, Button, InputAddress, InputFile, Modal, Password } from '@polkadot/react-components'; diff --git a/packages/page-accounts/src/modals/InputValidateAmount.tsx b/packages/page-accounts/src/modals/InputValidateAmount.tsx index d68800882d..d3e7bb81db 100644 --- a/packages/page-accounts/src/modals/InputValidateAmount.tsx +++ b/packages/page-accounts/src/modals/InputValidateAmount.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveBalancesAll } from '@polkadot/api-derive/types'; -import { AmountValidateState } from '../Accounts/types'; +import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; +import type { AmountValidateState } from '../Accounts/types'; import BN from 'bn.js'; import React, { useEffect, useState } from 'react'; diff --git a/packages/page-accounts/src/modals/MultisigApprove.tsx b/packages/page-accounts/src/modals/MultisigApprove.tsx index f4f8f9f445..2cfd4e346b 100644 --- a/packages/page-accounts/src/modals/MultisigApprove.tsx +++ b/packages/page-accounts/src/modals/MultisigApprove.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, Call, H256, Multisig } from '@polkadot/types/interfaces'; -import { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { AccountId, Call, H256, Multisig } from '@polkadot/types/interfaces'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-accounts/src/modals/MultisigCreate.tsx b/packages/page-accounts/src/modals/MultisigCreate.tsx index ba9b274227..440e669185 100644 --- a/packages/page-accounts/src/modals/MultisigCreate.tsx +++ b/packages/page-accounts/src/modals/MultisigCreate.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ActionStatus } from '@polkadot/react-components/Status/types'; -import { ModalProps } from '../types'; +import type { ActionStatus } from '@polkadot/react-components/Status/types'; +import type { ModalProps } from '../types'; import BN from 'bn.js'; import React, { useCallback, useState } from 'react'; diff --git a/packages/page-accounts/src/modals/ProxiedAdd.tsx b/packages/page-accounts/src/modals/ProxiedAdd.tsx index 4715d13b48..fec8d9c361 100644 --- a/packages/page-accounts/src/modals/ProxiedAdd.tsx +++ b/packages/page-accounts/src/modals/ProxiedAdd.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ActionStatus } from '@polkadot/react-components/Status/types'; -import { ModalProps } from '../types'; +import type { ActionStatus } from '@polkadot/react-components/Status/types'; +import type { ModalProps } from '../types'; import React, { useCallback, useState } from 'react'; import { Button, Input, InputAddressSimple, Modal } from '@polkadot/react-components'; diff --git a/packages/page-accounts/src/modals/ProxyOverview.tsx b/packages/page-accounts/src/modals/ProxyOverview.tsx index fa246e4874..32828ffb95 100644 --- a/packages/page-accounts/src/modals/ProxyOverview.tsx +++ b/packages/page-accounts/src/modals/ProxyOverview.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ApiPromise } from '@polkadot/api'; -import { SubmittableExtrinsic } from '@polkadot/api/types'; -import { AccountId, ProxyDefinition, ProxyType } from '@polkadot/types/interfaces'; +import type { ApiPromise } from '@polkadot/api'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { AccountId, ProxyDefinition, ProxyType } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; diff --git a/packages/page-accounts/src/modals/Qr.tsx b/packages/page-accounts/src/modals/Qr.tsx index ae71f25370..970c1bd3c7 100644 --- a/packages/page-accounts/src/modals/Qr.tsx +++ b/packages/page-accounts/src/modals/Qr.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ActionStatus } from '@polkadot/react-components/Status/types'; -import { ModalProps } from '../types'; +import type { ActionStatus } from '@polkadot/react-components/Status/types'; +import type { ModalProps } from '../types'; import React, { useCallback, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-accounts/src/modals/Transfer.tsx b/packages/page-accounts/src/modals/Transfer.tsx index 6652b26935..0c0d624025 100644 --- a/packages/page-accounts/src/modals/Transfer.tsx +++ b/packages/page-accounts/src/modals/Transfer.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveBalancesAll } from '@polkadot/api-derive/types'; -import { AccountInfo } from '@polkadot/types/interfaces'; +import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; +import type { AccountInfo } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import React, { useEffect, useState } from 'react'; diff --git a/packages/page-accounts/src/test-support/MemoryStore.ts b/packages/page-accounts/src/test-support/MemoryStore.ts index b0907f8ce5..423bedd7a6 100644 --- a/packages/page-accounts/src/test-support/MemoryStore.ts +++ b/packages/page-accounts/src/test-support/MemoryStore.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeyringJson, KeyringStore } from '@polkadot/ui-keyring/types'; +import type { KeyringJson, KeyringStore } from '@polkadot/ui-keyring/types'; type AccountsMap = Record; diff --git a/packages/page-accounts/src/types.ts b/packages/page-accounts/src/types.ts index 1d5674c08b..8548f38ab4 100644 --- a/packages/page-accounts/src/types.ts +++ b/packages/page-accounts/src/types.ts @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ActionStatus } from '@polkadot/react-components/Status/types'; -import { Balance, Conviction } from '@polkadot/types/interfaces'; -import { KeyringAddress } from '@polkadot/ui-keyring/types'; +import type { ActionStatus } from '@polkadot/react-components/Status/types'; +import type { Balance, Conviction } from '@polkadot/types/interfaces'; +import type { KeyringAddress } from '@polkadot/ui-keyring/types'; import { WithTranslation } from 'react-i18next'; diff --git a/packages/page-accounts/src/util.tsx b/packages/page-accounts/src/util.tsx index 3ca2cc2b2d..9090126b36 100644 --- a/packages/page-accounts/src/util.tsx +++ b/packages/page-accounts/src/util.tsx @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SortedAccount } from './types'; +import type { KeyringAddress } from '@polkadot/ui-keyring/types'; +import type { SortedAccount } from './types'; import React from 'react'; import { Menu } from '@polkadot/react-components'; import keyring from '@polkadot/ui-keyring'; -import { KeyringAddress } from '@polkadot/ui-keyring/types'; export function createMenuGroup (items: (React.ReactNode | false | undefined | null)[]): React.ReactNode | null { const filtered = items.filter((item): item is React.ReactNode => !!item); diff --git a/packages/page-addresses/src/Contacts/Address.tsx b/packages/page-addresses/src/Contacts/Address.tsx index 6ebfc93090..1f08bcde1a 100644 --- a/packages/page-addresses/src/Contacts/Address.tsx +++ b/packages/page-addresses/src/Contacts/Address.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2020 @polkadot/app-addresses authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveAccountInfo, DeriveBalancesAll } from '@polkadot/api-derive/types'; -import { KeyringAddress } from '@polkadot/ui-keyring/types'; -import { ActionStatus } from '@polkadot/react-components/Status/types'; -import { ThemeDef } from '@polkadot/react-components/types'; +import type { DeriveAccountInfo, DeriveBalancesAll } from '@polkadot/api-derive/types'; +import type { KeyringAddress } from '@polkadot/ui-keyring/types'; +import type { ActionStatus } from '@polkadot/react-components/Status/types'; +import type { ThemeDef } from '@polkadot/react-components/types'; import React, { useCallback, useContext, useEffect, useState } from 'react'; import styled, { ThemeContext } from 'styled-components'; diff --git a/packages/page-addresses/src/Contacts/index.tsx b/packages/page-addresses/src/Contacts/index.tsx index a8acf39ddf..817a85185b 100644 --- a/packages/page-addresses/src/Contacts/index.tsx +++ b/packages/page-addresses/src/Contacts/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-addresses authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ComponentProps as Props } from '../types'; +import type { ComponentProps as Props } from '../types'; import React, { useEffect, useMemo, useRef, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-addresses/src/index.tsx b/packages/page-addresses/src/index.tsx index 8ef77ba888..ca18d4e8f5 100644 --- a/packages/page-addresses/src/index.tsx +++ b/packages/page-addresses/src/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-addresses authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AppProps as Props } from '@polkadot/react-components/types'; +import type { AppProps as Props } from '@polkadot/react-components/types'; import React, { useRef } from 'react'; import { Route, Switch } from 'react-router'; diff --git a/packages/page-addresses/src/modals/Create.tsx b/packages/page-addresses/src/modals/Create.tsx index f145b16f28..0f80774e96 100644 --- a/packages/page-addresses/src/modals/Create.tsx +++ b/packages/page-addresses/src/modals/Create.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-addresses authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveAccountInfo } from '@polkadot/api-derive/types'; -import { ActionStatus } from '@polkadot/react-components/Status/types'; -import { ModalProps as Props } from '../types'; +import type { DeriveAccountInfo } from '@polkadot/api-derive/types'; +import type { ActionStatus } from '@polkadot/react-components/Status/types'; +import type { ModalProps as Props } from '../types'; import React, { useCallback, useState } from 'react'; import { AddressRow, Button, Input, InputAddress, Modal } from '@polkadot/react-components'; diff --git a/packages/page-addresses/src/types.ts b/packages/page-addresses/src/types.ts index dbdb3814c4..55daa4d13d 100644 --- a/packages/page-addresses/src/types.ts +++ b/packages/page-addresses/src/types.ts @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-addresses authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ActionStatus } from '@polkadot/react-components/Status/types'; -import { Balance, Conviction } from '@polkadot/types/interfaces'; -import { KeyringAddress } from '@polkadot/ui-keyring/types'; +import type { ActionStatus } from '@polkadot/react-components/Status/types'; +import type { Balance, Conviction } from '@polkadot/types/interfaces'; +import type { KeyringAddress } from '@polkadot/ui-keyring/types'; import { WithTranslation } from 'react-i18next'; diff --git a/packages/page-addresses/src/util.tsx b/packages/page-addresses/src/util.tsx index 5580aa3f1f..f6893ed05c 100644 --- a/packages/page-addresses/src/util.tsx +++ b/packages/page-addresses/src/util.tsx @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/app-addresses authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SortedAccount } from './types'; +import type { KeyringAddress } from '@polkadot/ui-keyring/types'; +import type { SortedAccount } from './types'; import React from 'react'; import { Menu } from '@polkadot/react-components'; import keyring from '@polkadot/ui-keyring'; -import { KeyringAddress } from '@polkadot/ui-keyring/types'; export function createMenuGroup (items: (React.ReactNode | false | undefined | null)[]): React.ReactNode | null { const filtered = items.filter((item): item is React.ReactNode => !!item); diff --git a/packages/page-calendar/src/Day.tsx b/packages/page-calendar/src/Day.tsx index d6ac4430f4..489bb85dd3 100644 --- a/packages/page-calendar/src/Day.tsx +++ b/packages/page-calendar/src/Day.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-calendar authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { EntryInfo } from './types'; +import type { EntryInfo } from './types'; import React, { useMemo, useRef } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-calendar/src/DayHour.tsx b/packages/page-calendar/src/DayHour.tsx index ca57e9d5ed..aeb197fb76 100644 --- a/packages/page-calendar/src/DayHour.tsx +++ b/packages/page-calendar/src/DayHour.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-calendar authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { EntryInfo } from './types'; +import type { EntryInfo } from './types'; import React, { useMemo } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-calendar/src/DayItem.tsx b/packages/page-calendar/src/DayItem.tsx index 4af5e0b2a0..99ad8a84ba 100644 --- a/packages/page-calendar/src/DayItem.tsx +++ b/packages/page-calendar/src/DayItem.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-calendar authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { EntryInfo } from './types'; +import type { EntryInfo } from './types'; import React, { useMemo } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-calendar/src/Month.tsx b/packages/page-calendar/src/Month.tsx index cc24a45840..21bed4f476 100644 --- a/packages/page-calendar/src/Month.tsx +++ b/packages/page-calendar/src/Month.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-calendar authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DateState, EntryInfo } from './types'; +import type { DateState, EntryInfo } from './types'; import React, { useMemo, useRef } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-calendar/src/MonthDay.tsx b/packages/page-calendar/src/MonthDay.tsx index 3a609ff2e5..e15488596d 100644 --- a/packages/page-calendar/src/MonthDay.tsx +++ b/packages/page-calendar/src/MonthDay.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-calendar authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { EntryInfo } from './types'; +import type { EntryInfo } from './types'; import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-calendar/src/index.tsx b/packages/page-calendar/src/index.tsx index 8f99553b89..7ba08f8d71 100644 --- a/packages/page-calendar/src/index.tsx +++ b/packages/page-calendar/src/index.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-calendar authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeProps } from '@polkadot/react-components/types'; -import { DateState } from './types'; +import type { ThemeProps } from '@polkadot/react-components/types'; +import type { DateState } from './types'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-calendar/src/useScheduled.ts b/packages/page-calendar/src/useScheduled.ts index 3c1953a525..f1f54f531a 100644 --- a/packages/page-calendar/src/useScheduled.ts +++ b/packages/page-calendar/src/useScheduled.ts @@ -1,14 +1,14 @@ // Copyright 2017-2020 @polkadot/app-calendar authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveCollectiveProposal, DeriveDispatch, DeriveReferendumExt, DeriveSessionProgress } from '@polkadot/api-derive/types'; -import { BlockNumber, EraIndex, Scheduled, UnappliedSlash } from '@polkadot/types/interfaces'; -import { EntryInfo, EntryType } from './types'; +import type { DeriveCollectiveProposal, DeriveDispatch, DeriveReferendumExt, DeriveSessionProgress } from '@polkadot/api-derive/types'; +import type { Option } from '@polkadot/types'; +import type { BlockNumber, EraIndex, Scheduled, UnappliedSlash } from '@polkadot/types/interfaces'; +import type { EntryInfo, EntryType } from './types'; import BN from 'bn.js'; import { useEffect, useState } from 'react'; import { useApi, useBlockTime, useCall } from '@polkadot/react-hooks'; -import { Option } from '@polkadot/types'; import { BN_ONE } from '@polkadot/util'; interface DateExt { diff --git a/packages/page-calendar/src/util.ts b/packages/page-calendar/src/util.ts index e395e15029..b582c055a1 100644 --- a/packages/page-calendar/src/util.ts +++ b/packages/page-calendar/src/util.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-calendar authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DateState } from './types'; +import type { DateState } from './types'; import { DAYS } from './constants'; diff --git a/packages/page-claims/src/Attest.tsx b/packages/page-claims/src/Attest.tsx index 58a895768c..fb90ec23c5 100644 --- a/packages/page-claims/src/Attest.tsx +++ b/packages/page-claims/src/Attest.tsx @@ -1,13 +1,14 @@ // Copyright 2017-2020 @polkadot/app-claims authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { TxCallback } from '@polkadot/react-components/Status/types'; +import type { Option } from '@polkadot/types'; + import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; import { Button, Card, TxButton } from '@polkadot/react-components'; -import { TxCallback } from '@polkadot/react-components/Status/types'; import { useAccounts, useApi } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; -import { Option } from '@polkadot/types'; import { BalanceOf, EthereumAddress, StatementKind } from '@polkadot/types/interfaces'; import { ClaimStyles } from './Claim'; diff --git a/packages/page-claims/src/Claim.tsx b/packages/page-claims/src/Claim.tsx index 6dd09e037e..75b2dec6a3 100644 --- a/packages/page-claims/src/Claim.tsx +++ b/packages/page-claims/src/Claim.tsx @@ -1,13 +1,13 @@ // Copyright 2017-2020 @polkadot/app-claims authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Option } from '@polkadot/types'; -import { BalanceOf, EthereumAddress, StatementKind } from '@polkadot/types/interfaces'; +import type { Option } from '@polkadot/types'; +import type { TxCallback } from '@polkadot/react-components/Status/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 { TxCallback } from '@polkadot/react-components/Status/types'; import { useApi } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; diff --git a/packages/page-claims/src/Statement.tsx b/packages/page-claims/src/Statement.tsx index f88e6666cd..67a3b5c780 100644 --- a/packages/page-claims/src/Statement.tsx +++ b/packages/page-claims/src/Statement.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-claims authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeProps } from '@polkadot/react-components/types'; -import { StatementKind } from '@polkadot/types/interfaces'; +import type { ThemeProps } from '@polkadot/react-components/types'; +import type { StatementKind } from '@polkadot/types/interfaces'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/page-claims/src/index.tsx b/packages/page-claims/src/index.tsx index 668ff93867..c7745a8d47 100644 --- a/packages/page-claims/src/index.tsx +++ b/packages/page-claims/src/index.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-claims authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AppProps as Props, ThemeProps } from '@polkadot/react-components/types'; -import { Option } from '@polkadot/types'; -import { EcdsaSignature, EthereumAddress, StatementKind } from '@polkadot/types/interfaces'; +import type { AppProps as Props, ThemeProps } from '@polkadot/react-components/types'; +import type { Option } from '@polkadot/types'; +import type { EcdsaSignature, EthereumAddress, StatementKind } from '@polkadot/types/interfaces'; import React, { useState, useCallback, useEffect, useRef } from 'react'; import { Trans } from 'react-i18next'; diff --git a/packages/page-claims/src/usePolkadotPreclaims.ts b/packages/page-claims/src/usePolkadotPreclaims.ts index 4e2f189720..a365dae513 100644 --- a/packages/page-claims/src/usePolkadotPreclaims.ts +++ b/packages/page-claims/src/usePolkadotPreclaims.ts @@ -1,13 +1,13 @@ // Copyright 2017-2020 @polkadot/app-settings authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { QueryableStorageEntry } from '@polkadot/api/types'; -import { Codec } from '@polkadot/types/types'; -import { EthereumAddress } from '@polkadot/types/interfaces'; +import type { QueryableStorageEntry } from '@polkadot/api/types'; +import type { Option } from '@polkadot/types'; +import type { Codec } from '@polkadot/types/types'; +import type { EthereumAddress } from '@polkadot/types/interfaces'; import { useEffect, useState } from 'react'; import { useAccounts, useApi, useCall, useIsMountedRef } from '@polkadot/react-hooks'; -import { Option } from '@polkadot/types'; export default function usePolkadotPreclaims (): string[] { const { allAccounts } = useAccounts(); diff --git a/packages/page-contracts/src/Codes/Add.tsx b/packages/page-contracts/src/Codes/Add.tsx index 25d9c09762..d8ae16177d 100644 --- a/packages/page-contracts/src/Codes/Add.tsx +++ b/packages/page-contracts/src/Codes/Add.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { StringOrNull } from '@polkadot/react-components/types'; +import type { StringOrNull } from '@polkadot/react-components/types'; import React, { useCallback, useState } from 'react'; import { Button, Input, Modal } from '@polkadot/react-components'; diff --git a/packages/page-contracts/src/Codes/Code.tsx b/packages/page-contracts/src/Codes/Code.tsx index 5839a162b7..ef3d0cc157 100644 --- a/packages/page-contracts/src/Codes/Code.tsx +++ b/packages/page-contracts/src/Codes/Code.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Codec } from '@polkadot/types/types'; -import { CodeStored } from '../types'; +import type { Option } from '@polkadot/types'; +import type { Codec } from '@polkadot/types/types'; +import type { CodeStored } from '../types'; import React, { useCallback } from 'react'; import styled from 'styled-components'; import { Button, Card, CopyButton, Forget } from '@polkadot/react-components'; import { useApi, useCall, useToggle } from '@polkadot/react-hooks'; -import { Option } from '@polkadot/types'; import { CodeRow, Messages } from '../shared'; import store from '../store'; diff --git a/packages/page-contracts/src/Codes/Upload.tsx b/packages/page-contracts/src/Codes/Upload.tsx index a37b0767fd..5eb5424d19 100644 --- a/packages/page-contracts/src/Codes/Upload.tsx +++ b/packages/page-contracts/src/Codes/Upload.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; -import { CodeSubmittableResult } from '@polkadot/api-contract/promise/types'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { CodeSubmittableResult } from '@polkadot/api-contract/promise/types'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { CodePromise } from '@polkadot/api-contract'; diff --git a/packages/page-contracts/src/Codes/ValidateCode.tsx b/packages/page-contracts/src/Codes/ValidateCode.tsx index 841572e71d..ba7412bb97 100644 --- a/packages/page-contracts/src/Codes/ValidateCode.tsx +++ b/packages/page-contracts/src/Codes/ValidateCode.tsx @@ -3,10 +3,10 @@ /* eslint-disable camelcase */ -import { PrefabWasmModule } from '@polkadot/types/interfaces'; +import type { Option } from '@polkadot/types'; +import type { PrefabWasmModule } from '@polkadot/types/interfaces'; import React, { useMemo } from 'react'; -import { Option } from '@polkadot/types'; import { InfoForInput } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; import { isHex } from '@polkadot/util'; diff --git a/packages/page-contracts/src/Contracts/Add.tsx b/packages/page-contracts/src/Contracts/Add.tsx index 12486d7e24..dd67e5bac9 100644 --- a/packages/page-contracts/src/Contracts/Add.tsx +++ b/packages/page-contracts/src/Contracts/Add.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { StringOrNull } from '@polkadot/react-components/types'; -import { ActionStatus } from '@polkadot/react-components/Status/types'; +import type { StringOrNull } from '@polkadot/react-components/types'; +import type { ActionStatus } from '@polkadot/react-components/Status/types'; import React, { useCallback, useState } from 'react'; import { AddressRow, Button, Input, Modal } from '@polkadot/react-components'; diff --git a/packages/page-contracts/src/Contracts/Call.tsx b/packages/page-contracts/src/Contracts/Call.tsx index d0a7446ad6..694f931521 100644 --- a/packages/page-contracts/src/Contracts/Call.tsx +++ b/packages/page-contracts/src/Contracts/Call.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; -import { ContractCallOutcome } from '@polkadot/api-contract/types'; -import { CallResult } from './types'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { ContractCallOutcome } from '@polkadot/api-contract/types'; +import type { CallResult } from './types'; import BN from 'bn.js'; import React, { useCallback, useState, useEffect } from 'react'; diff --git a/packages/page-contracts/src/Contracts/Contract.tsx b/packages/page-contracts/src/Contracts/Contract.tsx index 912931061b..89ea358b55 100644 --- a/packages/page-contracts/src/Contracts/Contract.tsx +++ b/packages/page-contracts/src/Contracts/Contract.tsx @@ -1,10 +1,11 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ContractCallOutcome } from '@polkadot/api-contract/types'; -import { ActionStatus } from '@polkadot/react-components/Status/types'; -import { BlockNumber, ContractInfo } from '@polkadot/types/interfaces'; -import { ContractLink } from './types'; +import type { ContractCallOutcome } from '@polkadot/api-contract/types'; +import type { ActionStatus } from '@polkadot/react-components/Status/types'; +import type { Option } from '@polkadot/types'; +import type { BlockNumber, ContractInfo } from '@polkadot/types/interfaces'; +import type { ContractLink } from './types'; import React, { useCallback, useEffect, useState } from 'react'; import keyring from '@polkadot/ui-keyring'; @@ -12,7 +13,6 @@ import { ContractPromise } from '@polkadot/api-contract'; import { AddressInfo, AddressMini, Button, Forget } from '@polkadot/react-components'; import { useApi, useCall, useToggle } from '@polkadot/react-hooks'; import { BlockToTime } from '@polkadot/react-query'; -import { Option } from '@polkadot/types'; import { formatNumber, isFunction, isUndefined } from '@polkadot/util'; import Messages from '../shared/Messages'; diff --git a/packages/page-contracts/src/Contracts/Outcome.tsx b/packages/page-contracts/src/Contracts/Outcome.tsx index d8218c87e0..669cad246f 100644 --- a/packages/page-contracts/src/Contracts/Outcome.tsx +++ b/packages/page-contracts/src/Contracts/Outcome.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { CallResult } from './types'; +import type { CallResult } from './types'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/page-contracts/src/Contracts/ValidateAddr.tsx b/packages/page-contracts/src/Contracts/ValidateAddr.tsx index 8d7d5c8fad..87cf9ae413 100644 --- a/packages/page-contracts/src/Contracts/ValidateAddr.tsx +++ b/packages/page-contracts/src/Contracts/ValidateAddr.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2020 @polkadot/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ContractInfo } from '@polkadot/types/interfaces'; +import type { Option } from '@polkadot/types'; +import type { ContractInfo } from '@polkadot/types/interfaces'; import React, { useEffect, useState } from 'react'; -import { Option } from '@polkadot/types'; import { useApi, useCall } from '@polkadot/react-hooks'; import { InfoForInput } from '@polkadot/react-components'; import keyring from '@polkadot/ui-keyring'; diff --git a/packages/page-contracts/src/Contracts/index.tsx b/packages/page-contracts/src/Contracts/index.tsx index cea93f8a1a..f405e96fd1 100644 --- a/packages/page-contracts/src/Contracts/index.tsx +++ b/packages/page-contracts/src/Contracts/index.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ContractCallOutcome } from '@polkadot/api-contract/types'; -import { FullNewBlock } from '@polkadot/api-derive/types'; -import { ContractLink } from './types'; +import type { ContractCallOutcome } from '@polkadot/api-contract/types'; +import type { FullNewBlock } from '@polkadot/api-derive/types'; +import type { ContractLink } from './types'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { ApiPromise } from '@polkadot/api'; diff --git a/packages/page-contracts/src/Contracts/types.ts b/packages/page-contracts/src/Contracts/types.ts index b20a55c72c..803dc69166 100644 --- a/packages/page-contracts/src/Contracts/types.ts +++ b/packages/page-contracts/src/Contracts/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AbiMessage, ContractCallOutcome } from '@polkadot/api-contract/types'; +import type { AbiMessage, ContractCallOutcome } from '@polkadot/api-contract/types'; export interface CallResult extends ContractCallOutcome { from: string; diff --git a/packages/page-contracts/src/Contracts/util.tsx b/packages/page-contracts/src/Contracts/util.tsx index 3a3cbe9988..44234b2fd1 100644 --- a/packages/page-contracts/src/Contracts/util.tsx +++ b/packages/page-contracts/src/Contracts/util.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AbiMessage } from '@polkadot/api-contract/types'; -import { StringOrNull } from '@polkadot/react-components/types'; +import type { AbiMessage } from '@polkadot/api-contract/types'; +import type { StringOrNull } from '@polkadot/react-components/types'; import React from 'react'; import { ApiPromise } from '@polkadot/api'; diff --git a/packages/page-contracts/src/Deploy.tsx b/packages/page-contracts/src/Deploy.tsx index 2083b3db62..ef658d9181 100644 --- a/packages/page-contracts/src/Deploy.tsx +++ b/packages/page-contracts/src/Deploy.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; -import { BlueprintSubmittableResult } from '@polkadot/api-contract/promise/types'; -import { StringOrNull } from '@polkadot/react-components/types'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { BlueprintSubmittableResult } from '@polkadot/api-contract/promise/types'; +import type { StringOrNull } from '@polkadot/react-components/types'; import BN from 'bn.js'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; diff --git a/packages/page-contracts/src/RemoveABI.tsx b/packages/page-contracts/src/RemoveABI.tsx index 3aa5dcee7a..b6382add0c 100644 --- a/packages/page-contracts/src/RemoveABI.tsx +++ b/packages/page-contracts/src/RemoveABI.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { CodeStored } from '@polkadot/app-contracts/types'; +import type { CodeStored } from './types'; import React, { useCallback } from 'react'; import { Button, Modal } from '@polkadot/react-components'; diff --git a/packages/page-contracts/src/index.tsx b/packages/page-contracts/src/index.tsx index b8dd019470..f39de76842 100644 --- a/packages/page-contracts/src/index.tsx +++ b/packages/page-contracts/src/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AppProps as Props } from '@polkadot/react-components/types'; +import type { AppProps as Props } from '@polkadot/react-components/types'; import React, { useCallback, useEffect, useRef, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-contracts/src/shared/CodeRow.tsx b/packages/page-contracts/src/shared/CodeRow.tsx index 98cd405aae..c6e761b595 100644 --- a/packages/page-contracts/src/shared/CodeRow.tsx +++ b/packages/page-contracts/src/shared/CodeRow.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { CodeStored } from '@polkadot/app-contracts/types'; +import type { CodeStored } from '../types'; import React, { useCallback, useEffect, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-contracts/src/shared/InputMegaGas.tsx b/packages/page-contracts/src/shared/InputMegaGas.tsx index 1365537e08..16b0795e4d 100644 --- a/packages/page-contracts/src/shared/InputMegaGas.tsx +++ b/packages/page-contracts/src/shared/InputMegaGas.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { UseWeight } from '../types'; +import type { UseWeight } from '../types'; import BN from 'bn.js'; import React, { useEffect, useMemo, useState } from 'react'; diff --git a/packages/page-contracts/src/shared/InputName.tsx b/packages/page-contracts/src/shared/InputName.tsx index bbe5f621ac..707941097e 100644 --- a/packages/page-contracts/src/shared/InputName.tsx +++ b/packages/page-contracts/src/shared/InputName.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { VoidFn } from '@polkadot/react-components/types'; +import type { VoidFn } from '@polkadot/react-components/types'; import React from 'react'; import { Input } from '@polkadot/react-components'; diff --git a/packages/page-contracts/src/shared/Message.tsx b/packages/page-contracts/src/shared/Message.tsx index b8b17f76aa..0fbf96b5ed 100644 --- a/packages/page-contracts/src/shared/Message.tsx +++ b/packages/page-contracts/src/shared/Message.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AbiConstructor, AbiMessage, ContractCallOutcome } from '@polkadot/api-contract/types'; +import type { AbiConstructor, AbiMessage, ContractCallOutcome } from '@polkadot/api-contract/types'; import React, { useCallback } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-contracts/src/shared/MessageSignature.tsx b/packages/page-contracts/src/shared/MessageSignature.tsx index 616b791e54..9dde6c4f09 100644 --- a/packages/page-contracts/src/shared/MessageSignature.tsx +++ b/packages/page-contracts/src/shared/MessageSignature.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AbiMessage } from '@polkadot/api-contract/types'; +import type { AbiMessage } from '@polkadot/api-contract/types'; +import type { ThemeProps } from '@polkadot/react-components/types'; import React from 'react'; -import { ThemeProps } from '@polkadot/react-components/types'; import styled from 'styled-components'; import { Icon, Tooltip } from '@polkadot/react-components'; import { encodeTypeDef } from '@polkadot/types/create'; diff --git a/packages/page-contracts/src/shared/Messages.tsx b/packages/page-contracts/src/shared/Messages.tsx index d29be7d5dc..fa0db9654f 100644 --- a/packages/page-contracts/src/shared/Messages.tsx +++ b/packages/page-contracts/src/shared/Messages.tsx @@ -1,16 +1,16 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AbiMessage, ContractCallOutcome } from '@polkadot/api-contract/types'; -import { ContractInfo } from '@polkadot/types/interfaces'; -import { ThemeProps } from '@polkadot/react-components/types'; +import type { AbiMessage, ContractCallOutcome } from '@polkadot/api-contract/types'; +import type { Option } from '@polkadot/types'; +import type { ContractInfo } from '@polkadot/types/interfaces'; +import type { ThemeProps } from '@polkadot/react-components/types'; import React, { useCallback, useEffect, useState } from 'react'; import styled from 'styled-components'; import { Abi, ContractPromise } from '@polkadot/api-contract'; import { Expander } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { Option } from '@polkadot/types'; import { formatNumber } from '@polkadot/util'; import Message from './Message'; diff --git a/packages/page-contracts/src/shared/Params.tsx b/packages/page-contracts/src/shared/Params.tsx index c3ed746d44..bb7b12a8d6 100644 --- a/packages/page-contracts/src/shared/Params.tsx +++ b/packages/page-contracts/src/shared/Params.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Registry, TypeDef } from '@polkadot/types/types'; -import { RawParams } from '@polkadot/react-params/types'; +import type { Registry, TypeDef } from '@polkadot/types/types'; +import type { RawParams } from '@polkadot/react-params/types'; import React, { useCallback, useEffect, useState } from 'react'; import UIParams from '@polkadot/react-params'; diff --git a/packages/page-contracts/src/store.ts b/packages/page-contracts/src/store.ts index 342ac638ac..4ce472291a 100644 --- a/packages/page-contracts/src/store.ts +++ b/packages/page-contracts/src/store.ts @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Hash } from '@polkadot/types/interfaces'; -import { CodeJson, CodeStored } from './types'; +import type { Hash } from '@polkadot/types/interfaces'; +import type { CodeJson, CodeStored } from './types'; import EventEmitter from 'eventemitter3'; import store from 'store'; diff --git a/packages/page-contracts/src/useAbi.ts b/packages/page-contracts/src/useAbi.ts index c7393db895..da3c583643 100644 --- a/packages/page-contracts/src/useAbi.ts +++ b/packages/page-contracts/src/useAbi.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { StringOrNull } from '@polkadot/react-components/types'; +import type { StringOrNull } from '@polkadot/react-components/types'; import { useCallback, useEffect, useState } from 'react'; import { Abi } from '@polkadot/api-contract'; diff --git a/packages/page-contracts/src/useWeight.ts b/packages/page-contracts/src/useWeight.ts index c74ba6e710..fdb837bdf8 100644 --- a/packages/page-contracts/src/useWeight.ts +++ b/packages/page-contracts/src/useWeight.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { UseWeight } from './types'; +import type { UseWeight } from './types'; import BN from 'bn.js'; import { useCallback, useMemo, useState } from 'react'; diff --git a/packages/page-council/src/Motions/Motion.tsx b/packages/page-council/src/Motions/Motion.tsx index 4b99145264..e6e41b9c1c 100644 --- a/packages/page-council/src/Motions/Motion.tsx +++ b/packages/page-council/src/Motions/Motion.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-council authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId } from '@polkadot/types/interfaces'; -import { DeriveCollectiveProposal } from '@polkadot/api-derive/types'; +import type { AccountId } from '@polkadot/types/interfaces'; +import type { DeriveCollectiveProposal } from '@polkadot/api-derive/types'; import React, { useMemo } from 'react'; import ProposalCell from '@polkadot/app-democracy/Overview/ProposalCell'; diff --git a/packages/page-council/src/Motions/ProposeExternal.tsx b/packages/page-council/src/Motions/ProposeExternal.tsx index 716e15bc85..fe7dbe8a8e 100644 --- a/packages/page-council/src/Motions/ProposeExternal.tsx +++ b/packages/page-council/src/Motions/ProposeExternal.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-council authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; import React, { useCallback, useEffect, useState } from 'react'; import { Button, Input, InputAddress, Modal, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-council/src/Motions/ProposeMotion.tsx b/packages/page-council/src/Motions/ProposeMotion.tsx index 1ee8006db7..e25121f429 100644 --- a/packages/page-council/src/Motions/ProposeMotion.tsx +++ b/packages/page-council/src/Motions/ProposeMotion.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-council authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; import BN from 'bn.js'; import React, { useCallback, useEffect, useState } from 'react'; diff --git a/packages/page-council/src/Motions/Slashing.tsx b/packages/page-council/src/Motions/Slashing.tsx index 9bf565d688..25192773d5 100644 --- a/packages/page-council/src/Motions/Slashing.tsx +++ b/packages/page-council/src/Motions/Slashing.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-council authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; import React, { useEffect, useMemo, useState } from 'react'; import { Button, Dropdown, Input, InputAddress, Modal, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-council/src/Motions/index.tsx b/packages/page-council/src/Motions/index.tsx index ee041a2ff5..edc61a9abc 100644 --- a/packages/page-council/src/Motions/index.tsx +++ b/packages/page-council/src/Motions/index.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-council authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveCollectiveProposal } from '@polkadot/api-derive/types'; -import { AccountId } from '@polkadot/types/interfaces'; +import type { DeriveCollectiveProposal } from '@polkadot/api-derive/types'; +import type { AccountId } from '@polkadot/types/interfaces'; import React, { useRef } from 'react'; import { Button, Table } from '@polkadot/react-components'; diff --git a/packages/page-council/src/Overview/Candidates.tsx b/packages/page-council/src/Overview/Candidates.tsx index 7802412c09..3fe3950129 100644 --- a/packages/page-council/src/Overview/Candidates.tsx +++ b/packages/page-council/src/Overview/Candidates.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveElectionsInfo } from '@polkadot/api-derive/types'; -import { AccountId } from '@polkadot/types/interfaces'; +import type { DeriveElectionsInfo } from '@polkadot/api-derive/types'; +import type { AccountId } from '@polkadot/types/interfaces'; import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; diff --git a/packages/page-council/src/Overview/Members.tsx b/packages/page-council/src/Overview/Members.tsx index 1d2c6891b4..4324bea7d3 100644 --- a/packages/page-council/src/Overview/Members.tsx +++ b/packages/page-council/src/Overview/Members.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveElectionsInfo } from '@polkadot/api-derive/types'; -import { AccountId } from '@polkadot/types/interfaces'; +import type { DeriveElectionsInfo } from '@polkadot/api-derive/types'; +import type { AccountId } from '@polkadot/types/interfaces'; import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; diff --git a/packages/page-council/src/Overview/SubmitCandidacy.tsx b/packages/page-council/src/Overview/SubmitCandidacy.tsx index 81e2881bb6..9b9851cfa7 100644 --- a/packages/page-council/src/Overview/SubmitCandidacy.tsx +++ b/packages/page-council/src/Overview/SubmitCandidacy.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-council authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ComponentProps as Props } from './types'; +import type { ComponentProps as Props } from './types'; import React, { useState } from 'react'; import { Button, InputAddress, InputBalance, Modal, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-council/src/Overview/Summary.tsx b/packages/page-council/src/Overview/Summary.tsx index 703c025bde..3a07138b4c 100644 --- a/packages/page-council/src/Overview/Summary.tsx +++ b/packages/page-council/src/Overview/Summary.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveElectionsInfo } from '@polkadot/api-derive/types'; -import { BlockNumber } from '@polkadot/types/interfaces'; -import { ComponentProps } from './types'; +import type { DeriveElectionsInfo } from '@polkadot/api-derive/types'; +import type { BlockNumber } from '@polkadot/types/interfaces'; +import type { ComponentProps } from './types'; import React from 'react'; import { SummaryBox, CardSummary } from '@polkadot/react-components'; diff --git a/packages/page-council/src/Overview/Vote.tsx b/packages/page-council/src/Overview/Vote.tsx index 584c66db30..4528830d26 100644 --- a/packages/page-council/src/Overview/Vote.tsx +++ b/packages/page-council/src/Overview/Vote.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-council authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveElectionsInfo } from '@polkadot/api-derive/types'; +import type { DeriveElectionsInfo } from '@polkadot/api-derive/types'; import React, { useEffect, useState } from 'react'; import { Button, InputAddress, InputAddressMulti, Modal, TxButton, VoteValue } from '@polkadot/react-components'; diff --git a/packages/page-council/src/Overview/index.tsx b/packages/page-council/src/Overview/index.tsx index 6ec88be4a3..df6e20c5f2 100644 --- a/packages/page-council/src/Overview/index.tsx +++ b/packages/page-council/src/Overview/index.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveCouncilVotes, DeriveElectionsInfo } from '@polkadot/api-derive/types'; -import { AccountId, BlockNumber } from '@polkadot/types/interfaces'; +import type { DeriveCouncilVotes, DeriveElectionsInfo } from '@polkadot/api-derive/types'; +import type { AccountId, BlockNumber } from '@polkadot/types/interfaces'; import React from 'react'; import { Button } from '@polkadot/react-components'; diff --git a/packages/page-council/src/Overview/types.ts b/packages/page-council/src/Overview/types.ts index 82c9c123e9..4c6a32999a 100644 --- a/packages/page-council/src/Overview/types.ts +++ b/packages/page-council/src/Overview/types.ts @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SetIndex } from '@polkadot/types/interfaces'; -import { DeriveElectionsInfo } from '@polkadot/api-derive/types'; +import type { SetIndex } from '@polkadot/types/interfaces'; +import type { DeriveElectionsInfo } from '@polkadot/api-derive/types'; import BN from 'bn.js'; diff --git a/packages/page-council/src/index.tsx b/packages/page-council/src/index.tsx index ca2619ebd3..29ec7dd0b4 100644 --- a/packages/page-council/src/index.tsx +++ b/packages/page-council/src/index.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Option } from '@polkadot/types'; -import { AccountId } from '@polkadot/types/interfaces'; -import { DeriveCollectiveProposal } from '@polkadot/api-derive/types'; +import type { Option } from '@polkadot/types'; +import type { AccountId } from '@polkadot/types/interfaces'; +import type { DeriveCollectiveProposal } from '@polkadot/api-derive/types'; import React, { useMemo } from 'react'; import { Route, Switch } from 'react-router'; diff --git a/packages/page-council/src/useCounter.ts b/packages/page-council/src/useCounter.ts index 4c8ca31edb..66f3e3cd53 100644 --- a/packages/page-council/src/useCounter.ts +++ b/packages/page-council/src/useCounter.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveCollectiveProposal } from '@polkadot/api-derive/types'; +import type { DeriveCollectiveProposal } from '@polkadot/api-derive/types'; import { useAccounts, useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/page-democracy/src/Execute/DispatchEntry.tsx b/packages/page-democracy/src/Execute/DispatchEntry.tsx index 6eeb815dd6..032058f782 100644 --- a/packages/page-democracy/src/Execute/DispatchEntry.tsx +++ b/packages/page-democracy/src/Execute/DispatchEntry.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveDispatch } from '@polkadot/api-derive/types'; -import { BlockNumber } from '@polkadot/types/interfaces'; +import type { DeriveDispatch } from '@polkadot/api-derive/types'; +import type { BlockNumber } from '@polkadot/types/interfaces'; import React from 'react'; import { LinkExternal } from '@polkadot/react-components'; diff --git a/packages/page-democracy/src/Execute/DispatchQueue.tsx b/packages/page-democracy/src/Execute/DispatchQueue.tsx index 81bfed5a41..5b7aca10a4 100644 --- a/packages/page-democracy/src/Execute/DispatchQueue.tsx +++ b/packages/page-democracy/src/Execute/DispatchQueue.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveDispatch } from '@polkadot/api-derive/types'; +import type { DeriveDispatch } from '@polkadot/api-derive/types'; import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; diff --git a/packages/page-democracy/src/Execute/Scheduled.tsx b/packages/page-democracy/src/Execute/Scheduled.tsx index 9ee0899b08..8bb0cccc54 100644 --- a/packages/page-democracy/src/Execute/Scheduled.tsx +++ b/packages/page-democracy/src/Execute/Scheduled.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { BlockNumber } from '@polkadot/types/interfaces'; -import { ScheduledExt } from './types'; +import type { BlockNumber } from '@polkadot/types/interfaces'; +import type { ScheduledExt } from './types'; import React from 'react'; import { CallExpander } from '@polkadot/react-components'; diff --git a/packages/page-democracy/src/Execute/Scheduler.tsx b/packages/page-democracy/src/Execute/Scheduler.tsx index 165089abb7..7bc8f7be3f 100644 --- a/packages/page-democracy/src/Execute/Scheduler.tsx +++ b/packages/page-democracy/src/Execute/Scheduler.tsx @@ -1,13 +1,13 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { BlockNumber, Scheduled } from '@polkadot/types/interfaces'; -import { ScheduledExt } from './types'; +import type { Option } from '@polkadot/types'; +import type { BlockNumber, Scheduled } from '@polkadot/types/interfaces'; +import type { ScheduledExt } from './types'; import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { Option } from '@polkadot/types'; import { useTranslation } from '../translate'; import ScheduledView from './Scheduled'; diff --git a/packages/page-democracy/src/Execute/types.ts b/packages/page-democracy/src/Execute/types.ts index ca66d9d683..febb05eb18 100644 --- a/packages/page-democracy/src/Execute/types.ts +++ b/packages/page-democracy/src/Execute/types.ts @@ -1,9 +1,8 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { BlockNumber, Call, SchedulePeriod, SchedulePriority } from '@polkadot/types/interfaces'; - -import { Bytes, Option } from '@polkadot/types'; +import type { Bytes, Option } from '@polkadot/types'; +import type { BlockNumber, Call, SchedulePeriod, SchedulePriority } from '@polkadot/types/interfaces'; export interface ScheduledExt { blockNumber: BlockNumber; diff --git a/packages/page-democracy/src/Overview/External.tsx b/packages/page-democracy/src/Overview/External.tsx index 178c8bed7a..d2f6654eac 100644 --- a/packages/page-democracy/src/Overview/External.tsx +++ b/packages/page-democracy/src/Overview/External.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveProposalExternal } from '@polkadot/api-derive/types'; +import type { DeriveProposalExternal } from '@polkadot/api-derive/types'; import React from 'react'; import { AddressMini, Button } from '@polkadot/react-components'; diff --git a/packages/page-democracy/src/Overview/ExternalCell.tsx b/packages/page-democracy/src/Overview/ExternalCell.tsx index 9649921085..0ee383c011 100644 --- a/packages/page-democracy/src/Overview/ExternalCell.tsx +++ b/packages/page-democracy/src/Overview/ExternalCell.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveProposalImage } from '@polkadot/api-derive/types'; -import { Hash } from '@polkadot/types/interfaces'; +import type { DeriveProposalImage } from '@polkadot/api-derive/types'; +import type { Hash } from '@polkadot/types/interfaces'; import React from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/page-democracy/src/Overview/Externals.tsx b/packages/page-democracy/src/Overview/Externals.tsx index 219c0435b1..f6afba5274 100644 --- a/packages/page-democracy/src/Overview/Externals.tsx +++ b/packages/page-democracy/src/Overview/Externals.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveProposalExternal } from '@polkadot/api-derive/types'; +import type { DeriveProposalExternal } from '@polkadot/api-derive/types'; import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; diff --git a/packages/page-democracy/src/Overview/Fasttrack.tsx b/packages/page-democracy/src/Overview/Fasttrack.tsx index fbd875a61b..bbdc6636b7 100644 --- a/packages/page-democracy/src/Overview/Fasttrack.tsx +++ b/packages/page-democracy/src/Overview/Fasttrack.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; -import { Hash, VoteThreshold } from '@polkadot/types/interfaces'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { Hash, VoteThreshold } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import React, { useEffect, useMemo, useState } from 'react'; diff --git a/packages/page-democracy/src/Overview/PreImage.tsx b/packages/page-democracy/src/Overview/PreImage.tsx index c0bb1f0140..0fd7e3c561 100644 --- a/packages/page-democracy/src/Overview/PreImage.tsx +++ b/packages/page-democracy/src/Overview/PreImage.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/promise/types'; +import type { SubmittableExtrinsic } from '@polkadot/api/promise/types'; import { Hash } from '@polkadot/types/interfaces'; import BN from 'bn.js'; diff --git a/packages/page-democracy/src/Overview/Proposal.tsx b/packages/page-democracy/src/Overview/Proposal.tsx index 1d51735f2a..9c4fbe4780 100644 --- a/packages/page-democracy/src/Overview/Proposal.tsx +++ b/packages/page-democracy/src/Overview/Proposal.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveProposal } from '@polkadot/api-derive/types'; +import type { DeriveProposal } from '@polkadot/api-derive/types'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/page-democracy/src/Overview/ProposalCell.tsx b/packages/page-democracy/src/Overview/ProposalCell.tsx index 89d30b00e6..d7f05a1c19 100644 --- a/packages/page-democracy/src/Overview/ProposalCell.tsx +++ b/packages/page-democracy/src/Overview/ProposalCell.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Hash, Proposal, ProposalIndex } from '@polkadot/types/interfaces'; +import type { Compact } from '@polkadot/types'; +import type { Hash, Proposal, ProposalIndex } from '@polkadot/types/interfaces'; import React from 'react'; import { CallExpander } from '@polkadot/react-components'; -import { Compact } from '@polkadot/types'; import { useTranslation } from '../translate'; import ExternalCell from './ExternalCell'; diff --git a/packages/page-democracy/src/Overview/Proposals.tsx b/packages/page-democracy/src/Overview/Proposals.tsx index 2be64e85d2..cbb0da7087 100644 --- a/packages/page-democracy/src/Overview/Proposals.tsx +++ b/packages/page-democracy/src/Overview/Proposals.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveProposal } from '@polkadot/api-derive/types'; +import type { DeriveProposal } from '@polkadot/api-derive/types'; import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; diff --git a/packages/page-democracy/src/Overview/Referendum.tsx b/packages/page-democracy/src/Overview/Referendum.tsx index 3038874aa1..9ec93cf931 100644 --- a/packages/page-democracy/src/Overview/Referendum.tsx +++ b/packages/page-democracy/src/Overview/Referendum.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveReferendumExt } from '@polkadot/api-derive/types'; -import { Balance, BlockNumber } from '@polkadot/types/interfaces'; +import type { DeriveReferendumExt } from '@polkadot/api-derive/types'; +import type { Balance, BlockNumber } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import React, { useMemo } from 'react'; diff --git a/packages/page-democracy/src/Overview/ReferendumVote.tsx b/packages/page-democracy/src/Overview/ReferendumVote.tsx index 063f994c75..65871fa1e2 100644 --- a/packages/page-democracy/src/Overview/ReferendumVote.tsx +++ b/packages/page-democracy/src/Overview/ReferendumVote.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveReferendumVote } from '@polkadot/api-derive/types'; -import { Vote } from '@polkadot/types/interfaces'; +import type { DeriveReferendumVote } from '@polkadot/api-derive/types'; +import type { Vote } from '@polkadot/types/interfaces'; import React from 'react'; import { AddressMini } from '@polkadot/react-components'; diff --git a/packages/page-democracy/src/Overview/ReferendumVotes.tsx b/packages/page-democracy/src/Overview/ReferendumVotes.tsx index b3b9543edd..be34aa0191 100644 --- a/packages/page-democracy/src/Overview/ReferendumVotes.tsx +++ b/packages/page-democracy/src/Overview/ReferendumVotes.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveReferendumVote } from '@polkadot/api-derive/types'; +import type { DeriveReferendumVote } from '@polkadot/api-derive/types'; import BN from 'bn.js'; import React, { useMemo } from 'react'; diff --git a/packages/page-democracy/src/Overview/Referendums.tsx b/packages/page-democracy/src/Overview/Referendums.tsx index e1ba36f6b4..0d310dfab8 100644 --- a/packages/page-democracy/src/Overview/Referendums.tsx +++ b/packages/page-democracy/src/Overview/Referendums.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveReferendumExt } from '@polkadot/api-derive/types'; +import type { DeriveReferendumExt } from '@polkadot/api-derive/types'; import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; diff --git a/packages/page-democracy/src/Overview/Seconding.tsx b/packages/page-democracy/src/Overview/Seconding.tsx index 86885ca163..1721d9a2e6 100644 --- a/packages/page-democracy/src/Overview/Seconding.tsx +++ b/packages/page-democracy/src/Overview/Seconding.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveProposalImage } from '@polkadot/api-derive/types'; -import { AccountId } from '@polkadot/types/interfaces'; +import type { DeriveProposalImage } from '@polkadot/api-derive/types'; +import type { AccountId } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import React, { useState } from 'react'; diff --git a/packages/page-democracy/src/Overview/TreasuryCell.tsx b/packages/page-democracy/src/Overview/TreasuryCell.tsx index 375999275d..b2bb0d1a54 100644 --- a/packages/page-democracy/src/Overview/TreasuryCell.tsx +++ b/packages/page-democracy/src/Overview/TreasuryCell.tsx @@ -1,13 +1,13 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ProposalIndex, TreasuryProposal } from '@polkadot/types/interfaces'; -import { TypeDef } from '@polkadot/types/types'; +import type { Compact, Option } from '@polkadot/types'; +import type { ProposalIndex, TreasuryProposal } from '@polkadot/types/interfaces'; +import type { TypeDef } from '@polkadot/types/types'; import React, { useEffect, useState } from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; import Params from '@polkadot/react-params'; -import { Compact, Option } from '@polkadot/types'; import { getTypeDef } from '@polkadot/types/create'; interface Props { diff --git a/packages/page-democracy/src/Overview/index.tsx b/packages/page-democracy/src/Overview/index.tsx index c1c8eefe27..7be272b409 100644 --- a/packages/page-democracy/src/Overview/index.tsx +++ b/packages/page-democracy/src/Overview/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveReferendumExt } from '@polkadot/api-derive/types'; +import type { DeriveReferendumExt } from '@polkadot/api-derive/types'; import React from 'react'; import { Button } from '@polkadot/react-components'; diff --git a/packages/page-explorer/src/BlockInfo/ByHash.tsx b/packages/page-explorer/src/BlockInfo/ByHash.tsx index 684efcd262..28cdd97487 100644 --- a/packages/page-explorer/src/BlockInfo/ByHash.tsx +++ b/packages/page-explorer/src/BlockInfo/ByHash.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-explorer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { EventRecord, SignedBlock } from '@polkadot/types/interfaces'; -import { KeyedEvent } from '@polkadot/react-query/types'; +import type { EventRecord, SignedBlock } from '@polkadot/types/interfaces'; +import type { KeyedEvent } from '@polkadot/react-query/types'; import React, { useEffect, useState } from 'react'; import { Link } from 'react-router-dom'; diff --git a/packages/page-explorer/src/BlockInfo/Extrinsic.tsx b/packages/page-explorer/src/BlockInfo/Extrinsic.tsx index af61f4d7db..6b7d28552a 100644 --- a/packages/page-explorer/src/BlockInfo/Extrinsic.tsx +++ b/packages/page-explorer/src/BlockInfo/Extrinsic.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-explorer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { BlockNumber, Extrinsic } from '@polkadot/types/interfaces'; -import { KeyedEvent } from '@polkadot/react-query/types'; +import type { BlockNumber, Extrinsic } from '@polkadot/types/interfaces'; +import type { KeyedEvent } from '@polkadot/react-query/types'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/page-explorer/src/BlockInfo/Extrinsics.tsx b/packages/page-explorer/src/BlockInfo/Extrinsics.tsx index 096aed5eda..11e91c7c2f 100644 --- a/packages/page-explorer/src/BlockInfo/Extrinsics.tsx +++ b/packages/page-explorer/src/BlockInfo/Extrinsics.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-explorer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { BlockNumber, Extrinsic } from '@polkadot/types/interfaces'; -import { KeyedEvent } from '@polkadot/react-query/types'; +import type { BlockNumber, Extrinsic } from '@polkadot/types/interfaces'; +import type { KeyedEvent } from '@polkadot/react-query/types'; import React, { useMemo } from 'react'; import { Table } from '@polkadot/react-components'; diff --git a/packages/page-explorer/src/BlockInfo/Logs.tsx b/packages/page-explorer/src/BlockInfo/Logs.tsx index eb33ee5482..b7fb6ec90f 100644 --- a/packages/page-explorer/src/BlockInfo/Logs.tsx +++ b/packages/page-explorer/src/BlockInfo/Logs.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2020 @polkadot/app-explorer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DigestItem } from '@polkadot/types/interfaces'; -import { Codec, TypeDef } from '@polkadot/types/types'; +import type { DigestItem } from '@polkadot/types/interfaces'; +import type { Codec, TypeDef } from '@polkadot/types/types'; import React, { useRef } from 'react'; -import { Struct, Tuple, Raw, Vec } from '@polkadot/types'; import { getTypeDef } from '@polkadot/types/create'; import { Expander, Table } from '@polkadot/react-components'; import Params from '@polkadot/react-params'; +import { Struct, Tuple, Raw, Vec } from '@polkadot/types'; import { useTranslation } from '../translate'; diff --git a/packages/page-explorer/src/Events.tsx b/packages/page-explorer/src/Events.tsx index 650e70f052..f3768b158c 100644 --- a/packages/page-explorer/src/Events.tsx +++ b/packages/page-explorer/src/Events.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-explorer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeyedEvent } from '@polkadot/react-query/types'; +import type { KeyedEvent } from '@polkadot/react-query/types'; import React, { useMemo } from 'react'; import { Link } from 'react-router-dom'; diff --git a/packages/page-explorer/src/Forks.tsx b/packages/page-explorer/src/Forks.tsx index 2987c028f5..8551a6e5a5 100644 --- a/packages/page-explorer/src/Forks.tsx +++ b/packages/page-explorer/src/Forks.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2020 @polkadot/app-explorer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ApiProps } from '@polkadot/react-api/types'; -import { Header } from '@polkadot/types/interfaces'; +import type { ApiProps } from '@polkadot/react-api/types'; +import type { ThemeProps } from '@polkadot/react-components/types'; +import type { Header } from '@polkadot/types/interfaces'; import React, { useCallback, useEffect, useRef, useState } from 'react'; -import { ThemeProps } from '@polkadot/react-components/types'; import styled from 'styled-components'; import { CardSummary, IdentityIcon, SummaryBox } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; diff --git a/packages/page-explorer/src/Main.tsx b/packages/page-explorer/src/Main.tsx index f5ab83fbbd..dbf68de874 100644 --- a/packages/page-explorer/src/Main.tsx +++ b/packages/page-explorer/src/Main.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-explorer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeyedEvent } from '@polkadot/react-query/types'; +import type { KeyedEvent } from '@polkadot/react-query/types'; import React from 'react'; import { HeaderExtended } from '@polkadot/api-derive'; diff --git a/packages/page-explorer/src/NodeInfo/Summary.tsx b/packages/page-explorer/src/NodeInfo/Summary.tsx index 577cd15e5d..72ea7ff2c8 100644 --- a/packages/page-explorer/src/NodeInfo/Summary.tsx +++ b/packages/page-explorer/src/NodeInfo/Summary.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-nodeinfo authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Info } from './types'; +import type { Info } from './types'; import React, { useState, useEffect } from 'react'; import { SummaryBox, CardSummary } from '@polkadot/react-components'; diff --git a/packages/page-explorer/src/NodeInfo/index.tsx b/packages/page-explorer/src/NodeInfo/index.tsx index e3238ba3e3..52ddf800ae 100644 --- a/packages/page-explorer/src/NodeInfo/index.tsx +++ b/packages/page-explorer/src/NodeInfo/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-nodeinfo authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Info } from './types'; +import type { Info } from './types'; import React, { useEffect, useState } from 'react'; import { ApiPromise } from '@polkadot/api'; diff --git a/packages/page-explorer/src/NodeInfo/types.ts b/packages/page-explorer/src/NodeInfo/types.ts index 5dba5c43c3..52b9817fa0 100644 --- a/packages/page-explorer/src/NodeInfo/types.ts +++ b/packages/page-explorer/src/NodeInfo/types.ts @@ -1,9 +1,8 @@ // Copyright 2017-2020 @polkadot/app-nodeinfo authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { BlockNumber, Extrinsic, Health, PeerInfo } from '@polkadot/types/interfaces'; - -import { Vec } from '@polkadot/types'; +import type { Vec } from '@polkadot/types'; +import type { BlockNumber, Extrinsic, Health, PeerInfo } from '@polkadot/types/interfaces'; export interface Info { blockNumber?: BlockNumber; diff --git a/packages/page-explorer/src/SummarySession.tsx b/packages/page-explorer/src/SummarySession.tsx index eb38fc8925..b83d555001 100644 --- a/packages/page-explorer/src/SummarySession.tsx +++ b/packages/page-explorer/src/SummarySession.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-explorer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveSessionProgress } from '@polkadot/api-derive/types'; -import { Forcing } from '@polkadot/types/interfaces'; +import type { DeriveSessionProgress } from '@polkadot/api-derive/types'; +import type { Forcing } from '@polkadot/types/interfaces'; import React from 'react'; import { CardSummary } from '@polkadot/react-components'; diff --git a/packages/page-explorer/src/index.tsx b/packages/page-explorer/src/index.tsx index f711078945..85409b13f6 100644 --- a/packages/page-explorer/src/index.tsx +++ b/packages/page-explorer/src/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-explorer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeyedEvent } from '@polkadot/react-query/types'; +import type { KeyedEvent } from '@polkadot/react-query/types'; import React, { useContext, useRef } from 'react'; import { Route, Switch } from 'react-router'; diff --git a/packages/page-extrinsics/src/Balance.tsx b/packages/page-extrinsics/src/Balance.tsx index 670d1b1cc2..da128195ae 100644 --- a/packages/page-extrinsics/src/Balance.tsx +++ b/packages/page-extrinsics/src/Balance.tsx @@ -1,8 +1,9 @@ // Copyright 2017-2020 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; + import React from 'react'; -import { DeriveBalancesAll } from '@polkadot/api-derive/types'; import { InputBalance } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/page-extrinsics/src/Selection.tsx b/packages/page-extrinsics/src/Selection.tsx index a697201c9b..bec6fe4faa 100644 --- a/packages/page-extrinsics/src/Selection.tsx +++ b/packages/page-extrinsics/src/Selection.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-extrinsics authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; import React, { useCallback, useState } from 'react'; import { Button, Extrinsic, InputAddress, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-extrinsics/src/index.tsx b/packages/page-extrinsics/src/index.tsx index 3f99da5bf3..fcbee79114 100644 --- a/packages/page-extrinsics/src/index.tsx +++ b/packages/page-extrinsics/src/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-extrinsics authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AppProps as Props } from '@polkadot/react-components/types'; +import type { AppProps as Props } from '@polkadot/react-components/types'; import React, { useRef } from 'react'; import { Tabs } from '@polkadot/react-components'; diff --git a/packages/page-generic-asset/src/Assets.tsx b/packages/page-generic-asset/src/Assets.tsx index 429d5ff3e6..58640cf4ad 100644 --- a/packages/page-generic-asset/src/Assets.tsx +++ b/packages/page-generic-asset/src/Assets.tsx @@ -1,7 +1,7 @@ // Copyright 2019 @polkadot/app-generic-asset authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { I18nProps } from '@polkadot/react-components/types'; +import type { I18nProps } from '@polkadot/react-components/types'; import BN from 'bn.js'; import React, { useState } from 'react'; diff --git a/packages/page-generic-asset/src/Transfer.tsx b/packages/page-generic-asset/src/Transfer.tsx index 7122c1d0be..6658a90441 100644 --- a/packages/page-generic-asset/src/Transfer.tsx +++ b/packages/page-generic-asset/src/Transfer.tsx @@ -1,7 +1,7 @@ // Copyright 2019 @polkadot/app-generic-asset authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/promise/types'; +import type { SubmittableExtrinsic } from '@polkadot/api/promise/types'; import BN from 'bn.js'; import React, { useEffect, useState } from 'react'; diff --git a/packages/page-js/src/Output.tsx b/packages/page-js/src/Output.tsx index 2307599d90..130b9d5cac 100644 --- a/packages/page-js/src/Output.tsx +++ b/packages/page-js/src/Output.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2020 @polkadot/app-js authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Log } from './types'; +import type { ThemeProps } from '@polkadot/react-components/types'; +import type { Log } from './types'; import React from 'react'; -import { ThemeProps } from '@polkadot/react-components/types'; import styled from 'styled-components'; import { isError, isNull, isUndefined } from '@polkadot/util'; diff --git a/packages/page-js/src/Playground.tsx b/packages/page-js/src/Playground.tsx index 733c6b2e89..0d0b477786 100644 --- a/packages/page-js/src/Playground.tsx +++ b/packages/page-js/src/Playground.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2020 @polkadot/app-js authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ApiPromise } from '@polkadot/api'; -import { KeyringInstance } from '@polkadot/keyring/types'; -import { ApiProps } from '@polkadot/react-api/types'; -import { AppProps as Props } from '@polkadot/react-components/types'; -import { Log, LogType, Snippet } from './types'; +import type { ApiPromise } from '@polkadot/api'; +import type { KeyringInstance } from '@polkadot/keyring/types'; +import type { ApiProps } from '@polkadot/react-api/types'; +import type { AppProps as Props } from '@polkadot/react-components/types'; +import type { Log, LogType, Snippet } from './types'; import React, { useCallback, useRef, useState, useEffect } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-js/src/index.tsx b/packages/page-js/src/index.tsx index 717f9515b6..0bba04c573 100644 --- a/packages/page-js/src/index.tsx +++ b/packages/page-js/src/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-js authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AppProps as Props } from '@polkadot/react-components/types'; +import type { AppProps as Props } from '@polkadot/react-components/types'; import React from 'react'; diff --git a/packages/page-js/src/snippets/consts-examples.ts b/packages/page-js/src/snippets/consts-examples.ts index 008c259b54..ee30408adf 100644 --- a/packages/page-js/src/snippets/consts-examples.ts +++ b/packages/page-js/src/snippets/consts-examples.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-js authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Snippet } from '@polkadot/app-js/types'; +import type { Snippet } from '@polkadot/app-js/types'; // We must fix this :( /* eslint-disable sort-keys */ diff --git a/packages/page-js/src/snippets/extrinsics-examples.ts b/packages/page-js/src/snippets/extrinsics-examples.ts index 43aab5366a..f18083dbb3 100644 --- a/packages/page-js/src/snippets/extrinsics-examples.ts +++ b/packages/page-js/src/snippets/extrinsics-examples.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-js authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Snippet } from '@polkadot/app-js/types'; +import type { Snippet } from '@polkadot/app-js/types'; // We must fix this :( /* eslint-disable sort-keys */ diff --git a/packages/page-js/src/snippets/index.ts b/packages/page-js/src/snippets/index.ts index e512c345d6..e13c38f9b6 100644 --- a/packages/page-js/src/snippets/index.ts +++ b/packages/page-js/src/snippets/index.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-js authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Snippet } from './../types'; +import type { Snippet } from './../types'; import { constsStakingParameters } from './consts-examples'; import { extrinsicMakeTransfer } from './extrinsics-examples'; diff --git a/packages/page-js/src/snippets/rpc-examples.ts b/packages/page-js/src/snippets/rpc-examples.ts index cbdc3dbf0a..de608591d3 100644 --- a/packages/page-js/src/snippets/rpc-examples.ts +++ b/packages/page-js/src/snippets/rpc-examples.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-js authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Snippet } from '@polkadot/app-js/types'; +import type { Snippet } from '@polkadot/app-js/types'; // We must fix this :( /* eslint-disable sort-keys */ diff --git a/packages/page-js/src/snippets/storage-examples.ts b/packages/page-js/src/snippets/storage-examples.ts index 9bb6476ec1..f63f001e16 100644 --- a/packages/page-js/src/snippets/storage-examples.ts +++ b/packages/page-js/src/snippets/storage-examples.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-js authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Snippet } from '@polkadot/app-js/types'; +import type { Snippet } from '@polkadot/app-js/types'; const label = { children: 'Storage', diff --git a/packages/page-parachains/src/Overview/Parachain.tsx b/packages/page-parachains/src/Overview/Parachain.tsx index a63a0cde87..68c92cfbef 100644 --- a/packages/page-parachains/src/Overview/Parachain.tsx +++ b/packages/page-parachains/src/Overview/Parachain.tsx @@ -1,16 +1,16 @@ // Copyright 2017-2020 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { HeadData } from '@polkadot/types/interfaces'; -import { DeriveParachain } from '@polkadot/api-derive/types'; +import type { HeadData } from '@polkadot/types/interfaces'; +import type { DeriveParachain } from '@polkadot/api-derive/types'; +import type { Option } from '@polkadot/types'; +import type { ThemeProps } from '@polkadot/react-components/types'; import React, { useCallback } from 'react'; -import { ThemeProps } from '@polkadot/react-components/types'; import { useHistory } from 'react-router-dom'; import styled from 'styled-components'; import { Badge, Button, Icon } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { Option } from '@polkadot/types'; import { formatNumber } from '@polkadot/util'; import { useTranslation } from '../translate'; diff --git a/packages/page-parachains/src/Overview/Parachains.tsx b/packages/page-parachains/src/Overview/Parachains.tsx index 108bc3aa5e..f6783f16da 100644 --- a/packages/page-parachains/src/Overview/Parachains.tsx +++ b/packages/page-parachains/src/Overview/Parachains.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveParachain } from '@polkadot/api-derive/types'; +import type { DeriveParachain } from '@polkadot/api-derive/types'; import React, { useRef } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-parachains/src/Overview/Proposal.tsx b/packages/page-parachains/src/Overview/Proposal.tsx index f99e6fb8b7..ba106404bd 100644 --- a/packages/page-parachains/src/Overview/Proposal.tsx +++ b/packages/page-parachains/src/Overview/Proposal.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ProposalExt } from './types'; +import type { ProposalExt } from './types'; import React, { useMemo } from 'react'; import { AddressSmall, AddressMini } from '@polkadot/react-components'; diff --git a/packages/page-parachains/src/Overview/Proposals.tsx b/packages/page-parachains/src/Overview/Proposals.tsx index fbeb707fb4..09838cba5b 100644 --- a/packages/page-parachains/src/Overview/Proposals.tsx +++ b/packages/page-parachains/src/Overview/Proposals.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ProposalExt } from './types'; +import type { ProposalExt } from './types'; import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; diff --git a/packages/page-parachains/src/Overview/Register.tsx b/packages/page-parachains/src/Overview/Register.tsx index 06ee0c09a3..8b849a9551 100644 --- a/packages/page-parachains/src/Overview/Register.tsx +++ b/packages/page-parachains/src/Overview/Register.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/promise/types'; +import type { SubmittableExtrinsic } from '@polkadot/api/promise/types'; import BN from 'bn.js'; import React, { useMemo, useRef } from 'react'; diff --git a/packages/page-parachains/src/Overview/index.tsx b/packages/page-parachains/src/Overview/index.tsx index dd2f4fe1f6..836d29bb89 100644 --- a/packages/page-parachains/src/Overview/index.tsx +++ b/packages/page-parachains/src/Overview/index.tsx @@ -1,15 +1,15 @@ // Copyright 2017-2020 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveParachain } from '@polkadot/api-derive/types'; -import { ParaId, ParachainProposal } from '@polkadot/types/interfaces'; -import { ProposalExt } from './types'; +import type { DeriveParachain } from '@polkadot/api-derive/types'; +import type { Option } from '@polkadot/types'; +import type { ParaId, ParachainProposal } from '@polkadot/types/interfaces'; +import type { ProposalExt } from './types'; import BN from 'bn.js'; import React from 'react'; import { Button } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { Option } from '@polkadot/types'; import Transfer from '../Transfer'; import Parachains from './Parachains'; diff --git a/packages/page-parachains/src/Parachain/Deregister.tsx b/packages/page-parachains/src/Parachain/Deregister.tsx index a5dec0188b..094c9079ca 100644 --- a/packages/page-parachains/src/Parachain/Deregister.tsx +++ b/packages/page-parachains/src/Parachain/Deregister.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveParachainInfo } from '@polkadot/api-derive/types'; -import { SubmittableExtrinsic } from '@polkadot/api/promise/types'; +import type { DeriveParachainInfo } from '@polkadot/api-derive/types'; +import type { SubmittableExtrinsic } from '@polkadot/api/promise/types'; import React, { useCallback, useMemo, useRef } from 'react'; import { useApi } from '@polkadot/react-hooks'; diff --git a/packages/page-parachains/src/Parachain/Details.tsx b/packages/page-parachains/src/Parachain/Details.tsx index 9b38ac3612..647dde40dc 100644 --- a/packages/page-parachains/src/Parachain/Details.tsx +++ b/packages/page-parachains/src/Parachain/Details.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveParachainFull } from '@polkadot/api-derive/types'; -import { Bytes, Option } from '@polkadot/types'; +import type { DeriveParachainFull } from '@polkadot/api-derive/types'; +import type { Bytes, Option } from '@polkadot/types'; import FileSaver from 'file-saver'; import React, { useCallback } from 'react'; diff --git a/packages/page-parachains/src/Parachain/index.tsx b/packages/page-parachains/src/Parachain/index.tsx index d505ee22f4..3654e77ead 100644 --- a/packages/page-parachains/src/Parachain/index.tsx +++ b/packages/page-parachains/src/Parachain/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveParachainInfo, DeriveParachainFull } from '@polkadot/api-derive/types'; +import type { DeriveParachainInfo, DeriveParachainFull } from '@polkadot/api-derive/types'; import React, { useCallback } from 'react'; import { useHistory, useParams } from 'react-router-dom'; diff --git a/packages/page-parachains/src/ParachainInfo.tsx b/packages/page-parachains/src/ParachainInfo.tsx index 5c26116a01..1d5d1d287a 100644 --- a/packages/page-parachains/src/ParachainInfo.tsx +++ b/packages/page-parachains/src/ParachainInfo.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveParachainInfo } from '@polkadot/api-derive/types'; +import type { DeriveParachainInfo } from '@polkadot/api-derive/types'; import React from 'react'; import { AvatarItem, Icon } from '@polkadot/react-components'; diff --git a/packages/page-parachains/src/Transfer.tsx b/packages/page-parachains/src/Transfer.tsx index f18399786a..0fe143d39b 100644 --- a/packages/page-parachains/src/Transfer.tsx +++ b/packages/page-parachains/src/Transfer.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; -import { DeriveParachain } from '@polkadot/api-derive/types'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { DeriveParachain } from '@polkadot/api-derive/types'; import BN from 'bn.js'; import React, { useMemo, useState } from 'react'; diff --git a/packages/page-parachains/src/index.tsx b/packages/page-parachains/src/index.tsx index 26050c85e3..e30c95df93 100644 --- a/packages/page-parachains/src/index.tsx +++ b/packages/page-parachains/src/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveParachainInfo } from '@polkadot/api-derive/types'; +import type { DeriveParachainInfo } from '@polkadot/api-derive/types'; import React, { useMemo, useRef } from 'react'; import { matchPath, Route, Switch } from 'react-router'; diff --git a/packages/page-parachains/src/util.ts b/packages/page-parachains/src/util.ts index dd5e5e0580..289d5f1b5b 100644 --- a/packages/page-parachains/src/util.ts +++ b/packages/page-parachains/src/util.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { DeriveParachainInfo } from '@polkadot/api-derive/types'; +import type { DeriveParachainInfo } from '@polkadot/api-derive/types'; export function parachainName (t: TFunction, info: DeriveParachainInfo | null): string { return info?.name || t('Unknown Chain'); diff --git a/packages/page-poll/src/index.tsx b/packages/page-poll/src/index.tsx index 9e8f76e252..12d474a304 100644 --- a/packages/page-poll/src/index.tsx +++ b/packages/page-poll/src/index.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-poll authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Approvals, Balance, BlockNumber } from '@polkadot/types/interfaces'; -import { ITuple } from '@polkadot/types/types'; +import type { Approvals, Balance, BlockNumber } from '@polkadot/types/interfaces'; +import type { ITuple } from '@polkadot/types/types'; import BN from 'bn.js'; import React, { useEffect, useRef, useState } from 'react'; diff --git a/packages/page-rpc/src/Rpc/Results.tsx b/packages/page-rpc/src/Rpc/Results.tsx index 1bccf27917..297fe32aff 100644 --- a/packages/page-rpc/src/Rpc/Results.tsx +++ b/packages/page-rpc/src/Rpc/Results.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-rpc authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { QueueTx } from '@polkadot/react-components/Status/types'; -import { Codec } from '@polkadot/types/types'; +import type { QueueTx } from '@polkadot/react-components/Status/types'; +import type { Codec } from '@polkadot/types/types'; import React from 'react'; import { Output } from '@polkadot/react-components'; diff --git a/packages/page-rpc/src/Rpc/Selection.tsx b/packages/page-rpc/src/Rpc/Selection.tsx index f909ca50bc..1151aee56a 100644 --- a/packages/page-rpc/src/Rpc/Selection.tsx +++ b/packages/page-rpc/src/Rpc/Selection.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-rpc authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ParamDef, RawParam } from '@polkadot/react-params/types'; -import { QueueTxRpcAdd } from '@polkadot/react-components/Status/types'; -import { DefinitionRpcExt } from '@polkadot/types/types'; +import type { ParamDef, RawParam } from '@polkadot/react-params/types'; +import type { QueueTxRpcAdd } from '@polkadot/react-components/Status/types'; +import type { DefinitionRpcExt } from '@polkadot/types/types'; import React, { useCallback, useState } from 'react'; import { Button, InputRpc } from '@polkadot/react-components'; diff --git a/packages/page-rpc/src/index.tsx b/packages/page-rpc/src/index.tsx index 0615e2fe05..bc25d855e7 100644 --- a/packages/page-rpc/src/index.tsx +++ b/packages/page-rpc/src/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-rpc authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AppProps as Props } from '@polkadot/react-components/types'; +import type { AppProps as Props } from '@polkadot/react-components/types'; import React, { useRef } from 'react'; import { Route, Switch } from 'react-router'; diff --git a/packages/page-settings/src/Developer.tsx b/packages/page-settings/src/Developer.tsx index ea024260fa..8a71dcc89c 100644 --- a/packages/page-settings/src/Developer.tsx +++ b/packages/page-settings/src/Developer.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-settings authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ActionStatus } from '@polkadot/react-components/Status/types'; +import type { ActionStatus } from '@polkadot/react-components/Status/types'; import React, { useCallback, useEffect, useState } from 'react'; import { Trans } from 'react-i18next'; diff --git a/packages/page-settings/src/General.tsx b/packages/page-settings/src/General.tsx index 176750190c..0c83e30c67 100644 --- a/packages/page-settings/src/General.tsx +++ b/packages/page-settings/src/General.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-settings authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Option } from '@polkadot/apps-config/settings/types'; +import type { Option } from '@polkadot/apps-config/settings/types'; import React, { useCallback, useEffect, useState, useMemo } from 'react'; import { createLanguages, createSs58 } from '@polkadot/apps-config'; diff --git a/packages/page-settings/src/Metadata/Extensions.tsx b/packages/page-settings/src/Metadata/Extensions.tsx index bb1c241cb4..6c7cfb310e 100644 --- a/packages/page-settings/src/Metadata/Extensions.tsx +++ b/packages/page-settings/src/Metadata/Extensions.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-settings authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ChainInfo } from '../types'; +import type { ChainInfo } from '../types'; import React, { useCallback, useMemo, useState } from 'react'; import { extensionLogos } from '@polkadot/apps-config'; diff --git a/packages/page-settings/src/Metadata/NetworkSpecs.tsx b/packages/page-settings/src/Metadata/NetworkSpecs.tsx index d8d859eadd..d161b11db3 100644 --- a/packages/page-settings/src/Metadata/NetworkSpecs.tsx +++ b/packages/page-settings/src/Metadata/NetworkSpecs.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-settings authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ChainInfo } from '../types'; +import type { ChainInfo } from '../types'; import React, { useCallback, useEffect, useReducer, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-settings/src/index.tsx b/packages/page-settings/src/index.tsx index ef3e0aa9f2..682bfc1c66 100644 --- a/packages/page-settings/src/index.tsx +++ b/packages/page-settings/src/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-settings authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AppProps as Props } from '@polkadot/react-components/types'; +import type { AppProps as Props } from '@polkadot/react-components/types'; import React, { useMemo } from 'react'; import { Route, Switch } from 'react-router'; diff --git a/packages/page-settings/src/types.ts b/packages/page-settings/src/types.ts index af03151710..1fa4890ec2 100644 --- a/packages/page-settings/src/types.ts +++ b/packages/page-settings/src/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-settings authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { MetadataDef } from '@polkadot/extension-inject/types'; +import type { MetadataDef } from '@polkadot/extension-inject/types'; export interface ChainInfo extends MetadataDef { color: string | undefined; diff --git a/packages/page-settings/src/useChainInfo.ts b/packages/page-settings/src/useChainInfo.ts index c78315582f..3ffd5e07a0 100644 --- a/packages/page-settings/src/useChainInfo.ts +++ b/packages/page-settings/src/useChainInfo.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-settings authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ChainInfo } from './types'; +import type { ChainInfo } from './types'; import { useMemo } from 'react'; diff --git a/packages/page-settings/src/useExtensions.ts b/packages/page-settings/src/useExtensions.ts index 14288f4348..c458a4e982 100644 --- a/packages/page-settings/src/useExtensions.ts +++ b/packages/page-settings/src/useExtensions.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-settings authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { InjectedExtension, InjectedMetadataKnown, MetadataDef } from '@polkadot/extension-inject/types'; +import type { InjectedExtension, InjectedMetadataKnown, MetadataDef } from '@polkadot/extension-inject/types'; import { useEffect, useMemo, useState } from 'react'; import store from 'store'; diff --git a/packages/page-settings/src/util.tsx b/packages/page-settings/src/util.tsx index 0e522b7901..944c374b9a 100644 --- a/packages/page-settings/src/util.tsx +++ b/packages/page-settings/src/util.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-settings authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Option } from '@polkadot/apps-config/settings/types'; -import { SettingsStruct } from '@polkadot/ui-settings/types'; +import type { Option } from '@polkadot/apps-config/settings/types'; +import type { SettingsStruct } from '@polkadot/ui-settings/types'; import React from 'react'; import { ChainImg, Dropdown, IdentityIcon } from '@polkadot/react-components'; diff --git a/packages/page-signing/src/Sign.tsx b/packages/page-signing/src/Sign.tsx index 8b4fff3b44..3aa78ea7b7 100644 --- a/packages/page-signing/src/Sign.tsx +++ b/packages/page-signing/src/Sign.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-signing authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Signer } from '@polkadot/api/types'; -import { KeyringPair } from '@polkadot/keyring/types'; +import type { Signer } from '@polkadot/api/types'; +import type { KeyringPair } from '@polkadot/keyring/types'; import React, { useCallback, useEffect, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-signing/src/Unlock.tsx b/packages/page-signing/src/Unlock.tsx index d6bef4962e..2bea949305 100644 --- a/packages/page-signing/src/Unlock.tsx +++ b/packages/page-signing/src/Unlock.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-signing authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeyringPair } from '@polkadot/keyring/types'; +import type { KeyringPair } from '@polkadot/keyring/types'; import React, { useCallback, useEffect, useState } from 'react'; import { Button, InputAddress, Modal, Password } from '@polkadot/react-components'; diff --git a/packages/page-signing/src/Verify.tsx b/packages/page-signing/src/Verify.tsx index 0d1c98935d..c92d0421cd 100644 --- a/packages/page-signing/src/Verify.tsx +++ b/packages/page-signing/src/Verify.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-signing authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeypairType } from '@polkadot/util-crypto/types'; +import type { KeypairType } from '@polkadot/util-crypto/types'; import React, { useCallback, useEffect, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-signing/src/index.tsx b/packages/page-signing/src/index.tsx index e6ab8401fd..18afca7700 100644 --- a/packages/page-signing/src/index.tsx +++ b/packages/page-signing/src/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-signing authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AppProps as Props } from '@polkadot/react-components/types'; +import type { AppProps as Props } from '@polkadot/react-components/types'; import React, { useRef } from 'react'; import { Route, Switch } from 'react-router'; diff --git a/packages/page-society/src/Overview/Candidate.tsx b/packages/page-society/src/Overview/Candidate.tsx index 0f35232f12..ed6443501a 100644 --- a/packages/page-society/src/Overview/Candidate.tsx +++ b/packages/page-society/src/Overview/Candidate.tsx @@ -1,15 +1,15 @@ // Copyright 2017-2020 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveSocietyCandidate } from '@polkadot/api-derive/types'; -import { AccountId, SocietyVote } from '@polkadot/types/interfaces'; -import { VoteType } from '../types'; +import type { DeriveSocietyCandidate } from '@polkadot/api-derive/types'; +import type { Option } from '@polkadot/types'; +import type { AccountId, SocietyVote } from '@polkadot/types/interfaces'; +import type { VoteType } from '../types'; import React from 'react'; import { AddressSmall } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; -import { Option } from '@polkadot/types'; import CandidateVoting from './CandidateVoting'; import Votes from './Votes'; diff --git a/packages/page-society/src/Overview/Candidates.tsx b/packages/page-society/src/Overview/Candidates.tsx index b3e4a762a5..09c7e08b97 100644 --- a/packages/page-society/src/Overview/Candidates.tsx +++ b/packages/page-society/src/Overview/Candidates.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveSocietyCandidate } from '@polkadot/api-derive/types'; +import type { DeriveSocietyCandidate } from '@polkadot/api-derive/types'; import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; diff --git a/packages/page-society/src/Overview/Defender.tsx b/packages/page-society/src/Overview/Defender.tsx index 607cb2044a..77b2a3d2b0 100644 --- a/packages/page-society/src/Overview/Defender.tsx +++ b/packages/page-society/src/Overview/Defender.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveSociety, DeriveSocietyMember } from '@polkadot/api-derive/types'; -import { SocietyVote } from '@polkadot/types/interfaces'; -import { VoteType } from '../types'; +import type { DeriveSociety, DeriveSocietyMember } from '@polkadot/api-derive/types'; +import type { SocietyVote } from '@polkadot/types/interfaces'; +import type { VoteType } from '../types'; import React, { useRef } from 'react'; import { AddressSmall, Table } from '@polkadot/react-components'; diff --git a/packages/page-society/src/Overview/Member.tsx b/packages/page-society/src/Overview/Member.tsx index 7c3b207078..851d5cf6b8 100644 --- a/packages/page-society/src/Overview/Member.tsx +++ b/packages/page-society/src/Overview/Member.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveSocietyMember } from '@polkadot/api-derive/types'; +import type { DeriveSocietyMember } from '@polkadot/api-derive/types'; import React, { useEffect, useRef, useState } from 'react'; import { AddressSmall, Icon, Modal, Tag } from '@polkadot/react-components'; diff --git a/packages/page-society/src/Overview/Members.tsx b/packages/page-society/src/Overview/Members.tsx index 8ee2fe5c36..9ac6693fec 100644 --- a/packages/page-society/src/Overview/Members.tsx +++ b/packages/page-society/src/Overview/Members.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveSociety, DeriveSocietyMember } from '@polkadot/api-derive/types'; +import type { DeriveSociety, DeriveSocietyMember } from '@polkadot/api-derive/types'; import React, { useMemo, useRef } from 'react'; import { Table } from '@polkadot/react-components'; diff --git a/packages/page-society/src/Overview/Summary.tsx b/packages/page-society/src/Overview/Summary.tsx index e1eebbd225..c24445808b 100644 --- a/packages/page-society/src/Overview/Summary.tsx +++ b/packages/page-society/src/Overview/Summary.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveSociety } from '@polkadot/api-derive/types'; -import { BlockNumber } from '@polkadot/types/interfaces'; +import type { DeriveSociety } from '@polkadot/api-derive/types'; +import type { BlockNumber } from '@polkadot/types/interfaces'; import React, { useMemo } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-society/src/Overview/Votes.tsx b/packages/page-society/src/Overview/Votes.tsx index c49a8f175e..85efd849e4 100644 --- a/packages/page-society/src/Overview/Votes.tsx +++ b/packages/page-society/src/Overview/Votes.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { VoteSplit, VoteType } from '../types'; +import type { VoteSplit, VoteType } from '../types'; import React, { useEffect, useState } from 'react'; diff --git a/packages/page-society/src/Overview/VotesExpander.tsx b/packages/page-society/src/Overview/VotesExpander.tsx index 9355787f8e..631ec00148 100644 --- a/packages/page-society/src/Overview/VotesExpander.tsx +++ b/packages/page-society/src/Overview/VotesExpander.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { VoteType } from '../types'; +import type { VoteType } from '../types'; import React from 'react'; import { AddressMini, Expander } from '@polkadot/react-components'; diff --git a/packages/page-society/src/Overview/index.tsx b/packages/page-society/src/Overview/index.tsx index d7ace4346b..50d87fc223 100644 --- a/packages/page-society/src/Overview/index.tsx +++ b/packages/page-society/src/Overview/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveSociety } from '@polkadot/api-derive/types'; +import type { DeriveSociety } from '@polkadot/api-derive/types'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/page-society/src/useMembers.ts b/packages/page-society/src/useMembers.ts index 458dfbd431..4c8846a62b 100644 --- a/packages/page-society/src/useMembers.ts +++ b/packages/page-society/src/useMembers.ts @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveSocietyMember } from '@polkadot/api-derive/types'; -import { OwnMembers } from './types'; +import type { DeriveSocietyMember } from '@polkadot/api-derive/types'; +import type { OwnMembers } from './types'; import { useEffect, useState } from 'react'; import { useAccounts, useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/page-staking/src/Actions/Account/BondExtra.tsx b/packages/page-staking/src/Actions/Account/BondExtra.tsx index a969df0dcf..9005609467 100644 --- a/packages/page-staking/src/Actions/Account/BondExtra.tsx +++ b/packages/page-staking/src/Actions/Account/BondExtra.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveBalancesAll, DeriveStakingAccount } from '@polkadot/api-derive/types'; -import { AmountValidateState } from '../types'; +import type { DeriveBalancesAll, DeriveStakingAccount } from '@polkadot/api-derive/types'; +import type { AmountValidateState } from '../types'; import BN from 'bn.js'; import React, { useMemo, useState } from 'react'; diff --git a/packages/page-staking/src/Actions/Account/InjectKeys.tsx b/packages/page-staking/src/Actions/Account/InjectKeys.tsx index 99f3e827fc..a4f109fb6e 100644 --- a/packages/page-staking/src/Actions/Account/InjectKeys.tsx +++ b/packages/page-staking/src/Actions/Account/InjectKeys.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeypairType } from '@polkadot/util-crypto/types'; +import type { KeypairType } from '@polkadot/util-crypto/types'; import React, { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react'; import { Button, Dropdown, Input, Modal, StatusContext } from '@polkadot/react-components'; diff --git a/packages/page-staking/src/Actions/Account/InputValidateAmount.tsx b/packages/page-staking/src/Actions/Account/InputValidateAmount.tsx index f308460f8e..748017bf9c 100644 --- a/packages/page-staking/src/Actions/Account/InputValidateAmount.tsx +++ b/packages/page-staking/src/Actions/Account/InputValidateAmount.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveBalancesAll } from '@polkadot/api-derive/types'; -import { AmountValidateState } from '../types'; +import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; +import type { AmountValidateState } from '../types'; import BN from 'bn.js'; import React, { useEffect, useState } from 'react'; diff --git a/packages/page-staking/src/Actions/Account/InputValidationController.tsx b/packages/page-staking/src/Actions/Account/InputValidationController.tsx index 971890f4ae..d62d4c1504 100644 --- a/packages/page-staking/src/Actions/Account/InputValidationController.tsx +++ b/packages/page-staking/src/Actions/Account/InputValidationController.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveBalancesAll } from '@polkadot/api-derive/types'; -import { AccountId, StakingLedger } from '@polkadot/types/interfaces'; +import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; +import type { Option } from '@polkadot/types'; +import type { AccountId, StakingLedger } from '@polkadot/types/interfaces'; import React, { useEffect, useState } from 'react'; -import { Option } from '@polkadot/types'; import { useApi, useCall } from '@polkadot/react-hooks'; import { useTranslation } from '../../translate'; diff --git a/packages/page-staking/src/Actions/Account/InputValidationSessionKey.tsx b/packages/page-staking/src/Actions/Account/InputValidationSessionKey.tsx index 909001f573..ed7266feda 100644 --- a/packages/page-staking/src/Actions/Account/InputValidationSessionKey.tsx +++ b/packages/page-staking/src/Actions/Account/InputValidationSessionKey.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { I18nProps } from '@polkadot/react-components/types'; +import type { I18nProps } from '@polkadot/react-components/types'; import React, { useEffect, useState } from 'react'; diff --git a/packages/page-staking/src/Actions/Account/ListNominees.tsx b/packages/page-staking/src/Actions/Account/ListNominees.tsx index 28b10f2401..4591fb2028 100644 --- a/packages/page-staking/src/Actions/Account/ListNominees.tsx +++ b/packages/page-staking/src/Actions/Account/ListNominees.tsx @@ -1,9 +1,10 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { DeriveEraExposure, DeriveSessionIndexes } from '@polkadot/api-derive/types'; + import BN from 'bn.js'; import React, { useMemo } from 'react'; -import { DeriveEraExposure, DeriveSessionIndexes } from '@polkadot/api-derive/types'; import { AddressMini, Expander } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/page-staking/src/Actions/Account/Nominate.tsx b/packages/page-staking/src/Actions/Account/Nominate.tsx index 4889c2f22d..52e041da9f 100644 --- a/packages/page-staking/src/Actions/Account/Nominate.tsx +++ b/packages/page-staking/src/Actions/Account/Nominate.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { NominateInfo } from '../partials/types'; -import { SortedTargets } from '../../types'; +import type { NominateInfo } from '../partials/types'; +import type { SortedTargets } from '../../types'; import React, { useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-staking/src/Actions/Account/SetRewardDestination.tsx b/packages/page-staking/src/Actions/Account/SetRewardDestination.tsx index 96d6f81ed1..840dc09ce4 100644 --- a/packages/page-staking/src/Actions/Account/SetRewardDestination.tsx +++ b/packages/page-staking/src/Actions/Account/SetRewardDestination.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { RewardDestination } from '@polkadot/types/interfaces'; -import { DestinationType } from '../types'; +import type { RewardDestination } from '@polkadot/types/interfaces'; +import type { DestinationType } from '../types'; import React, { useMemo, useState } from 'react'; import { Dropdown, InputAddress, Modal, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-staking/src/Actions/Account/SetSessionKey.tsx b/packages/page-staking/src/Actions/Account/SetSessionKey.tsx index 5d6c068870..3db6741657 100644 --- a/packages/page-staking/src/Actions/Account/SetSessionKey.tsx +++ b/packages/page-staking/src/Actions/Account/SetSessionKey.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SessionInfo } from '../partials/types'; +import type { SessionInfo } from '../partials/types'; import React, { useState } from 'react'; import { Modal, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-staking/src/Actions/Account/Validate.tsx b/packages/page-staking/src/Actions/Account/Validate.tsx index f0d831c193..167b0cea16 100644 --- a/packages/page-staking/src/Actions/Account/Validate.tsx +++ b/packages/page-staking/src/Actions/Account/Validate.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ValidateInfo } from '../partials/types'; +import type { ValidateInfo } from '../partials/types'; import React, { useState } from 'react'; import { Modal, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-staking/src/Actions/Account/index.tsx b/packages/page-staking/src/Actions/Account/index.tsx index a4697d7117..24f3f641b4 100644 --- a/packages/page-staking/src/Actions/Account/index.tsx +++ b/packages/page-staking/src/Actions/Account/index.tsx @@ -1,11 +1,12 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveBalancesAll, DeriveStakingAccount } from '@polkadot/api-derive/types'; -import { SlashingSpans, UnappliedSlash } from '@polkadot/types/interfaces'; -import { StakerState } from '@polkadot/react-hooks/types'; -import { SortedTargets } from '../../types'; -import { Slash } from '../types'; +import type { DeriveBalancesAll, DeriveStakingAccount } from '@polkadot/api-derive/types'; +import type { Option } from '@polkadot/types'; +import type { SlashingSpans, UnappliedSlash } from '@polkadot/types/interfaces'; +import type { StakerState } from '@polkadot/react-hooks/types'; +import type { SortedTargets } from '../../types'; +import type { Slash } from '../types'; import BN from 'bn.js'; import React, { useCallback, useContext, useMemo } from 'react'; @@ -13,7 +14,6 @@ import styled from 'styled-components'; import { ApiPromise } from '@polkadot/api'; import { AddressInfo, AddressMini, AddressSmall, Badge, Button, Menu, Popup, StakingBonded, StakingRedeemable, StakingUnbonding, StatusContext, TxButton } from '@polkadot/react-components'; import { useApi, useCall, useToggle } from '@polkadot/react-hooks'; -import { Option } from '@polkadot/types'; import { formatNumber } from '@polkadot/util'; import { useTranslation } from '../../translate'; diff --git a/packages/page-staking/src/Actions/NewNominator.tsx b/packages/page-staking/src/Actions/NewNominator.tsx index b5f73e0d78..9358980615 100644 --- a/packages/page-staking/src/Actions/NewNominator.tsx +++ b/packages/page-staking/src/Actions/NewNominator.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { BondInfo, NominateInfo } from './partials/types'; -import { SortedTargets } from '../types'; +import type { BondInfo, NominateInfo } from './partials/types'; +import type { SortedTargets } from '../types'; import React, { useCallback, useState } from 'react'; import { Button, Modal, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-staking/src/Actions/NewStash.tsx b/packages/page-staking/src/Actions/NewStash.tsx index a33e981757..ffaf07b415 100644 --- a/packages/page-staking/src/Actions/NewStash.tsx +++ b/packages/page-staking/src/Actions/NewStash.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { BondInfo } from './partials/types'; +import type { BondInfo } from './partials/types'; import React, { useCallback, useState } from 'react'; import { Button, Modal, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-staking/src/Actions/NewValidator.tsx b/packages/page-staking/src/Actions/NewValidator.tsx index 0015b93dff..a40c2d65eb 100644 --- a/packages/page-staking/src/Actions/NewValidator.tsx +++ b/packages/page-staking/src/Actions/NewValidator.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { BondInfo, SessionInfo, ValidateInfo } from './partials/types'; +import type { BondInfo, SessionInfo, ValidateInfo } from './partials/types'; import React, { useCallback, useState } from 'react'; import { Button, Modal, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-staking/src/Actions/index.tsx b/packages/page-staking/src/Actions/index.tsx index a491892e95..236ad39568 100644 --- a/packages/page-staking/src/Actions/index.tsx +++ b/packages/page-staking/src/Actions/index.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { StakerState } from '@polkadot/react-hooks/types'; -import { SortedTargets } from '../types'; +import type { StakerState } from '@polkadot/react-hooks/types'; +import type { SortedTargets } from '../types'; import BN from 'bn.js'; import React, { useMemo, useRef } from 'react'; diff --git a/packages/page-staking/src/Actions/partials/Bond.tsx b/packages/page-staking/src/Actions/partials/Bond.tsx index 0525c0e7fc..036346bd4e 100644 --- a/packages/page-staking/src/Actions/partials/Bond.tsx +++ b/packages/page-staking/src/Actions/partials/Bond.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveBalancesAll } from '@polkadot/api-derive/types'; -import { AmountValidateState, DestinationType } from '../types'; -import { BondInfo } from './types'; +import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; +import type { AmountValidateState, DestinationType } from '../types'; +import type { BondInfo } from './types'; import BN from 'bn.js'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; diff --git a/packages/page-staking/src/Actions/partials/Nominate.tsx b/packages/page-staking/src/Actions/partials/Nominate.tsx index 93d8d1c825..4c035312d8 100644 --- a/packages/page-staking/src/Actions/partials/Nominate.tsx +++ b/packages/page-staking/src/Actions/partials/Nominate.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { NominateInfo } from './types'; -import { SortedTargets } from '../../types'; +import type { NominateInfo } from './types'; +import type { SortedTargets } from '../../types'; import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-staking/src/Actions/partials/SessionKey.tsx b/packages/page-staking/src/Actions/partials/SessionKey.tsx index d8b61c22f2..52edd946b6 100644 --- a/packages/page-staking/src/Actions/partials/SessionKey.tsx +++ b/packages/page-staking/src/Actions/partials/SessionKey.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SessionInfo } from './types'; +import type { SessionInfo } from './types'; import React, { useEffect, useState } from 'react'; import { InputAddress, Input, Modal } from '@polkadot/react-components'; diff --git a/packages/page-staking/src/Actions/partials/Validate.tsx b/packages/page-staking/src/Actions/partials/Validate.tsx index 013858846f..56b3495819 100644 --- a/packages/page-staking/src/Actions/partials/Validate.tsx +++ b/packages/page-staking/src/Actions/partials/Validate.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ValidateInfo } from './types'; +import type { ValidateInfo } from './types'; import BN from 'bn.js'; import React, { useCallback } from 'react'; diff --git a/packages/page-staking/src/Actions/partials/types.ts b/packages/page-staking/src/Actions/partials/types.ts index a0069d9df3..f9f252f17d 100644 --- a/packages/page-staking/src/Actions/partials/types.ts +++ b/packages/page-staking/src/Actions/partials/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; export interface BondInfo { bondOwnTx?: SubmittableExtrinsic<'promise'> | null; diff --git a/packages/page-staking/src/Actions/useInactives.ts b/packages/page-staking/src/Actions/useInactives.ts index 25dcbc02b6..d22c608ec7 100644 --- a/packages/page-staking/src/Actions/useInactives.ts +++ b/packages/page-staking/src/Actions/useInactives.ts @@ -1,13 +1,13 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveSessionIndexes } from '@polkadot/api-derive/types'; -import { EraIndex, Exposure, Nominations, SlashingSpans } from '@polkadot/types/interfaces'; +import type { DeriveSessionIndexes } from '@polkadot/api-derive/types'; +import type { Option } from '@polkadot/types'; +import type { EraIndex, Exposure, Nominations, SlashingSpans } from '@polkadot/types/interfaces'; import { useEffect, useState } from 'react'; import { ApiPromise } from '@polkadot/api'; import { useApi, useCall, useIsMountedRef } from '@polkadot/react-hooks'; -import { Option } from '@polkadot/types'; interface Inactives { nomsActive?: string[]; diff --git a/packages/page-staking/src/Actions/useUnbondDuration.ts b/packages/page-staking/src/Actions/useUnbondDuration.ts index 13a6af70df..dfb002077f 100644 --- a/packages/page-staking/src/Actions/useUnbondDuration.ts +++ b/packages/page-staking/src/Actions/useUnbondDuration.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveSessionInfo } from '@polkadot/api-derive/types'; +import type { DeriveSessionInfo } from '@polkadot/api-derive/types'; import BN from 'bn.js'; import { useMemo } from 'react'; diff --git a/packages/page-staking/src/Overview/Address/index.tsx b/packages/page-staking/src/Overview/Address/index.tsx index 0b152da957..be9956a9e3 100644 --- a/packages/page-staking/src/Overview/Address/index.tsx +++ b/packages/page-staking/src/Overview/Address/index.tsx @@ -1,9 +1,10 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Balance, EraIndex, SlashingSpans, ValidatorPrefs } from '@polkadot/types/interfaces'; -import { DeriveAccountInfo } from '@polkadot/api-derive/types'; -import { ValidatorInfo } from '../../types'; +import type { DeriveAccountInfo } from '@polkadot/api-derive/types'; +import type { Option } from '@polkadot/types'; +import type { Balance, EraIndex, SlashingSpans, ValidatorPrefs } from '@polkadot/types/interfaces'; +import type { ValidatorInfo } from '../../types'; import BN from 'bn.js'; import React, { useCallback, useMemo } from 'react'; @@ -12,7 +13,6 @@ import { AddressSmall, Icon, LinkExternal } from '@polkadot/react-components'; import { checkVisibility } from '@polkadot/react-components/util'; import { useApi, useCall } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; -import { Option } from '@polkadot/types'; import Favorite from './Favorite'; import NominatedBy from './NominatedBy'; diff --git a/packages/page-staking/src/Overview/CurrentList.tsx b/packages/page-staking/src/Overview/CurrentList.tsx index 8687f108fd..69f14aefd9 100644 --- a/packages/page-staking/src/Overview/CurrentList.tsx +++ b/packages/page-staking/src/Overview/CurrentList.tsx @@ -1,16 +1,16 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveHeartbeats, DeriveStakingOverview } from '@polkadot/api-derive/types'; -import { AccountId, EraIndex, Nominations } from '@polkadot/types/interfaces'; -import { Authors } from '@polkadot/react-query/BlockAuthors'; -import { SortedTargets, ValidatorInfo } from '../types'; +import type { DeriveHeartbeats, DeriveStakingOverview } from '@polkadot/api-derive/types'; +import type { Option, StorageKey } from '@polkadot/types'; +import type { AccountId, EraIndex, Nominations } from '@polkadot/types/interfaces'; +import type { Authors } from '@polkadot/react-query/BlockAuthors'; +import type { SortedTargets, ValidatorInfo } from '../types'; import React, { useCallback, useContext, useMemo, useRef, useState } from 'react'; import { Table } from '@polkadot/react-components'; import { useApi, useCall, useLoadingDelay } from '@polkadot/react-hooks'; import { BlockAuthorsContext } from '@polkadot/react-query'; -import { Option, StorageKey } from '@polkadot/types'; import Filtering from '../Filtering'; import { useTranslation } from '../translate'; diff --git a/packages/page-staking/src/Overview/Summary.tsx b/packages/page-staking/src/Overview/Summary.tsx index 4bd262ad81..a7443d1548 100644 --- a/packages/page-staking/src/Overview/Summary.tsx +++ b/packages/page-staking/src/Overview/Summary.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveStakingOverview } from '@polkadot/api-derive/types'; +import type { DeriveStakingOverview } from '@polkadot/api-derive/types'; import React, { useContext } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-staking/src/Overview/index.tsx b/packages/page-staking/src/Overview/index.tsx index 4579659704..b8fcf907e3 100644 --- a/packages/page-staking/src/Overview/index.tsx +++ b/packages/page-staking/src/Overview/index.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveStakingOverview } from '@polkadot/api-derive/types'; -import { SortedTargets } from '../types'; +import type { DeriveStakingOverview } from '@polkadot/api-derive/types'; +import type { SortedTargets } from '../types'; import React from 'react'; diff --git a/packages/page-staking/src/Payouts/PayButton.tsx b/packages/page-staking/src/Payouts/PayButton.tsx index f5d60acac1..c28580844c 100644 --- a/packages/page-staking/src/Payouts/PayButton.tsx +++ b/packages/page-staking/src/Payouts/PayButton.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; -import { EraIndex } from '@polkadot/types/interfaces'; -import { PayoutValidator } from './types'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { EraIndex } from '@polkadot/types/interfaces'; +import type { PayoutValidator } from './types'; import React, { useState, useEffect } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-staking/src/Payouts/Stash.tsx b/packages/page-staking/src/Payouts/Stash.tsx index fffd0a26ac..9af371bac9 100644 --- a/packages/page-staking/src/Payouts/Stash.tsx +++ b/packages/page-staking/src/Payouts/Stash.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; -import { DeriveStakerReward, DeriveStakingAccount } from '@polkadot/api-derive/types'; -import { PayoutStash } from './types'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { DeriveStakerReward, DeriveStakingAccount } from '@polkadot/api-derive/types'; +import type { PayoutStash } from './types'; import BN from 'bn.js'; import React, { useEffect, useState } from 'react'; diff --git a/packages/page-staking/src/Payouts/Validator.tsx b/packages/page-staking/src/Payouts/Validator.tsx index 1b80fbd0d2..884d259da6 100644 --- a/packages/page-staking/src/Payouts/Validator.tsx +++ b/packages/page-staking/src/Payouts/Validator.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { PayoutValidator } from './types'; +import type { PayoutValidator } from './types'; import BN from 'bn.js'; import React, { useMemo } from 'react'; diff --git a/packages/page-staking/src/Payouts/index.tsx b/packages/page-staking/src/Payouts/index.tsx index b2a497e3cd..40696ad4a3 100644 --- a/packages/page-staking/src/Payouts/index.tsx +++ b/packages/page-staking/src/Payouts/index.tsx @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { DeriveStakerReward } from '@polkadot/api-derive/types'; -import { StakerState } from '@polkadot/react-hooks/types'; -import { PayoutStash, PayoutValidator } from './types'; +import type { DeriveStakerReward } from '@polkadot/api-derive/types'; +import type { StakerState } from '@polkadot/react-hooks/types'; +import type { PayoutStash, PayoutValidator } from './types'; import BN from 'bn.js'; import React, { useMemo, useRef, useState } from 'react'; diff --git a/packages/page-staking/src/Payouts/types.ts b/packages/page-staking/src/Payouts/types.ts index 8d2f4cd7f5..e993b84c4f 100644 --- a/packages/page-staking/src/Payouts/types.ts +++ b/packages/page-staking/src/Payouts/types.ts @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveStakerReward } from '@polkadot/api-derive/types'; -import { Balance, EraIndex } from '@polkadot/types/interfaces'; +import type { DeriveStakerReward } from '@polkadot/api-derive/types'; +import type { Balance, EraIndex } from '@polkadot/types/interfaces'; import BN from 'bn.js'; diff --git a/packages/page-staking/src/Payouts/useEraBlocks.ts b/packages/page-staking/src/Payouts/useEraBlocks.ts index 239a324d95..6726f4005a 100644 --- a/packages/page-staking/src/Payouts/useEraBlocks.ts +++ b/packages/page-staking/src/Payouts/useEraBlocks.ts @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Forcing } from '@polkadot/types/interfaces'; -import { DeriveSessionProgress } from '@polkadot/api-derive/types'; +import type { Forcing } from '@polkadot/types/interfaces'; +import type { DeriveSessionProgress } from '@polkadot/api-derive/types'; import BN from 'bn.js'; import { useMemo } from 'react'; diff --git a/packages/page-staking/src/Payouts/useStakerPayouts.ts b/packages/page-staking/src/Payouts/useStakerPayouts.ts index 025b43969a..abda341304 100644 --- a/packages/page-staking/src/Payouts/useStakerPayouts.ts +++ b/packages/page-staking/src/Payouts/useStakerPayouts.ts @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { EraIndex } from '@polkadot/types/interfaces'; +import type { Option } from '@polkadot/types'; +import type { EraIndex } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import { useMemo } from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { Option } from '@polkadot/types'; import { isFunction } from '@polkadot/util'; export default function useStakerPayouts (): BN { diff --git a/packages/page-staking/src/Query/ChartPoints.tsx b/packages/page-staking/src/Query/ChartPoints.tsx index ceccd4b3a1..8467615cb6 100644 --- a/packages/page-staking/src/Query/ChartPoints.tsx +++ b/packages/page-staking/src/Query/ChartPoints.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveStakerPoints } from '@polkadot/api-derive/types'; -import { ChartInfo, LineDataEntry, Props } from './types'; +import type { DeriveStakerPoints } from '@polkadot/api-derive/types'; +import type { ChartInfo, LineDataEntry, Props } from './types'; import React, { useMemo, useRef } from 'react'; import { Chart, Spinner } from '@polkadot/react-components'; diff --git a/packages/page-staking/src/Query/ChartPrefs.tsx b/packages/page-staking/src/Query/ChartPrefs.tsx index ceefb5cfec..eda54b0b6b 100644 --- a/packages/page-staking/src/Query/ChartPrefs.tsx +++ b/packages/page-staking/src/Query/ChartPrefs.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveStakerPrefs } from '@polkadot/api-derive/types'; -import { ChartInfo, LineDataEntry, Props } from './types'; +import type { DeriveStakerPrefs } from '@polkadot/api-derive/types'; +import type { ChartInfo, LineDataEntry, Props } from './types'; import BN from 'bn.js'; import React, { useMemo, useRef } from 'react'; diff --git a/packages/page-staking/src/Query/ChartRewards.tsx b/packages/page-staking/src/Query/ChartRewards.tsx index 51e8a7270f..171793fa1f 100644 --- a/packages/page-staking/src/Query/ChartRewards.tsx +++ b/packages/page-staking/src/Query/ChartRewards.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveEraRewards, DeriveOwnSlashes, DeriveStakerPoints } from '@polkadot/api-derive/types'; -import { ChartInfo, LineDataEntry, Props } from './types'; +import type { DeriveEraRewards, DeriveOwnSlashes, DeriveStakerPoints } from '@polkadot/api-derive/types'; +import type { ChartInfo, LineDataEntry, Props } from './types'; import BN from 'bn.js'; import React, { useMemo } from 'react'; diff --git a/packages/page-staking/src/Query/ChartStake.tsx b/packages/page-staking/src/Query/ChartStake.tsx index a6f7a003e1..e7008df69b 100644 --- a/packages/page-staking/src/Query/ChartStake.tsx +++ b/packages/page-staking/src/Query/ChartStake.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveOwnExposure } from '@polkadot/api-derive/types'; -import { ChartInfo, LineDataEntry, Props } from './types'; +import type { DeriveOwnExposure } from '@polkadot/api-derive/types'; +import type { ChartInfo, LineDataEntry, Props } from './types'; import BN from 'bn.js'; import React, { useMemo } from 'react'; diff --git a/packages/page-staking/src/Query/Validator.tsx b/packages/page-staking/src/Query/Validator.tsx index b1fa01c03e..7e6bf39f92 100644 --- a/packages/page-staking/src/Query/Validator.tsx +++ b/packages/page-staking/src/Query/Validator.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Props } from './types'; +import type { Props } from './types'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/page-staking/src/Query/useBlockCounts.tsx b/packages/page-staking/src/Query/useBlockCounts.tsx index 670cbcf847..67d383dd1f 100644 --- a/packages/page-staking/src/Query/useBlockCounts.tsx +++ b/packages/page-staking/src/Query/useBlockCounts.tsx @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveSessionIndexes } from '@polkadot/api-derive/types'; -import { SessionRewards } from '../types'; +import type { DeriveSessionIndexes } from '@polkadot/api-derive/types'; +import type { u32 } from '@polkadot/types'; +import type { SessionRewards } from '../types'; import { useEffect, useState } from 'react'; import { useApi, useCall, useIsMountedRef } from '@polkadot/react-hooks'; -import { u32 } from '@polkadot/types'; import { isFunction } from '@polkadot/util'; export default function useBlockCounts (accountId: string, sessionRewards: SessionRewards[]): u32[] { diff --git a/packages/page-staking/src/Slashes/Era.tsx b/packages/page-staking/src/Slashes/Era.tsx index 387f89958c..84c8dcadf6 100644 --- a/packages/page-staking/src/Slashes/Era.tsx +++ b/packages/page-staking/src/Slashes/Era.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; -import { SlashEra } from './types'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { SlashEra } from './types'; import React, { useCallback, useRef, useState } from 'react'; import { Button, Table, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-staking/src/Slashes/Row.tsx b/packages/page-staking/src/Slashes/Row.tsx index 09ef9aea3e..d51e7a04c7 100644 --- a/packages/page-staking/src/Slashes/Row.tsx +++ b/packages/page-staking/src/Slashes/Row.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Slash } from './types'; +import type { Slash } from './types'; import React, { useCallback } from 'react'; import { AddressMini, AddressSmall, Badge, Checkbox, Expander } from '@polkadot/react-components'; diff --git a/packages/page-staking/src/Slashes/Summary.tsx b/packages/page-staking/src/Slashes/Summary.tsx index b6cc719726..9dd5336a40 100644 --- a/packages/page-staking/src/Slashes/Summary.tsx +++ b/packages/page-staking/src/Slashes/Summary.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveSessionProgress } from '@polkadot/api-derive/types'; -import { SlashEra } from './types'; +import type { DeriveSessionProgress } from '@polkadot/api-derive/types'; +import type { SlashEra } from './types'; import BN from 'bn.js'; import React, { useMemo } from 'react'; diff --git a/packages/page-staking/src/Slashes/index.tsx b/packages/page-staking/src/Slashes/index.tsx index 4ba3b4ab18..25c373c7c6 100644 --- a/packages/page-staking/src/Slashes/index.tsx +++ b/packages/page-staking/src/Slashes/index.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { StakerState } from '@polkadot/react-hooks/types'; -import { UnappliedSlash } from '@polkadot/types/interfaces'; -import { Slash, SlashEra } from './types'; +import type { StakerState } from '@polkadot/react-hooks/types'; +import type { UnappliedSlash } from '@polkadot/types/interfaces'; +import type { Slash, SlashEra } from './types'; import BN from 'bn.js'; import React, { useMemo, useState } from 'react'; diff --git a/packages/page-staking/src/Targets/Nominate.tsx b/packages/page-staking/src/Targets/Nominate.tsx index 6fdfec218d..aae5f7b76e 100644 --- a/packages/page-staking/src/Targets/Nominate.tsx +++ b/packages/page-staking/src/Targets/Nominate.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { StakerState } from '@polkadot/react-hooks/types'; +import type { StakerState } from '@polkadot/react-hooks/types'; import React, { useCallback, useMemo, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-staking/src/Targets/Validator.tsx b/packages/page-staking/src/Targets/Validator.tsx index 1344fafbcf..8af613e15f 100644 --- a/packages/page-staking/src/Targets/Validator.tsx +++ b/packages/page-staking/src/Targets/Validator.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveAccountInfo } from '@polkadot/api-derive/types'; -import { UnappliedSlash } from '@polkadot/types/interfaces'; -import { ValidatorInfo } from '../types'; +import type { DeriveAccountInfo } from '@polkadot/api-derive/types'; +import type { UnappliedSlash } from '@polkadot/types/interfaces'; +import type { ValidatorInfo } from '../types'; import BN from 'bn.js'; import React, { useCallback, useEffect, useMemo } from 'react'; diff --git a/packages/page-staking/src/Targets/index.tsx b/packages/page-staking/src/Targets/index.tsx index 59bcdd7ed1..819f60218d 100644 --- a/packages/page-staking/src/Targets/index.tsx +++ b/packages/page-staking/src/Targets/index.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveStakingOverview } from '@polkadot/api-derive/types'; -import { StakerState } from '@polkadot/react-hooks/types'; -import { SortedTargets, TargetSortBy, ValidatorInfo } from '../types'; +import type { DeriveStakingOverview } from '@polkadot/api-derive/types'; +import type { StakerState } from '@polkadot/react-hooks/types'; +import type { SortedTargets, TargetSortBy, ValidatorInfo } from '../types'; import BN from 'bn.js'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; diff --git a/packages/page-staking/src/Targets/useOwnNominators.ts b/packages/page-staking/src/Targets/useOwnNominators.ts index b84c750df4..efd909dcf2 100644 --- a/packages/page-staking/src/Targets/useOwnNominators.ts +++ b/packages/page-staking/src/Targets/useOwnNominators.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { StakerState } from '@polkadot/react-hooks/types'; +import type { StakerState } from '@polkadot/react-hooks/types'; import { useMemo } from 'react'; diff --git a/packages/page-staking/src/index.tsx b/packages/page-staking/src/index.tsx index 16d9fcf59c..36a16c1946 100644 --- a/packages/page-staking/src/index.tsx +++ b/packages/page-staking/src/index.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveStakingOverview } from '@polkadot/api-derive/types'; -import { AppProps as Props, ThemeProps } from '@polkadot/react-components/types'; -import { ElectionStatus } from '@polkadot/types/interfaces'; +import type { DeriveStakingOverview } from '@polkadot/api-derive/types'; +import type { AppProps as Props, ThemeProps } from '@polkadot/react-components/types'; +import type { ElectionStatus } from '@polkadot/types/interfaces'; import React, { useMemo } from 'react'; import { Route, Switch } from 'react-router'; diff --git a/packages/page-staking/src/useSortedTargets.ts b/packages/page-staking/src/useSortedTargets.ts index f6140da0b9..fe292540d0 100644 --- a/packages/page-staking/src/useSortedTargets.ts +++ b/packages/page-staking/src/useSortedTargets.ts @@ -1,15 +1,15 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveSessionIndexes, DeriveStakingElected, DeriveStakingWaiting } from '@polkadot/api-derive/types'; -import { Balance, ValidatorPrefsTo196 } from '@polkadot/types/interfaces'; -import { SortedTargets, TargetSortBy, ValidatorInfo } from './types'; +import type { DeriveSessionIndexes, DeriveStakingElected, DeriveStakingWaiting } from '@polkadot/api-derive/types'; +import type { Option } from '@polkadot/types'; +import type { Balance, ValidatorPrefsTo196 } from '@polkadot/types/interfaces'; +import type { SortedTargets, TargetSortBy, ValidatorInfo } from './types'; import BN from 'bn.js'; import { useMemo, useState } from 'react'; import { registry } from '@polkadot/react-api'; import { useAccounts, useApi, useCall, useDebounce } from '@polkadot/react-hooks'; -import { Option } from '@polkadot/types'; import { BN_ONE, BN_ZERO, formatBalance } from '@polkadot/util'; const PERBILL = new BN(1_000_000_000); diff --git a/packages/page-storage/src/Queries.tsx b/packages/page-storage/src/Queries.tsx index 5865621809..6a251d8889 100644 --- a/packages/page-storage/src/Queries.tsx +++ b/packages/page-storage/src/Queries.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-storage authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { QueryTypes } from './types'; +import type { QueryTypes } from './types'; import React from 'react'; diff --git a/packages/page-storage/src/Query.tsx b/packages/page-storage/src/Query.tsx index a52667f319..4470d6eadf 100644 --- a/packages/page-storage/src/Query.tsx +++ b/packages/page-storage/src/Query.tsx @@ -1,10 +1,11 @@ // Copyright 2017-2020 @polkadot/app-storage authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { QueryableStorageEntry } from '@polkadot/api/types'; -import { RenderFn, DefaultProps, ComponentRenderer } from '@polkadot/react-api/hoc/types'; -import { ConstValue } from '@polkadot/react-components/InputConsts/types'; -import { QueryTypes, StorageModuleQuery } from './types'; +import type { QueryableStorageEntry } from '@polkadot/api/types'; +import type { RenderFn, DefaultProps, ComponentRenderer } from '@polkadot/react-api/hoc/types'; +import type { ConstValue } from '@polkadot/react-components/InputConsts/types'; +import type { Option, Raw } from '@polkadot/types'; +import type { QueryTypes, StorageModuleQuery } from './types'; import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; @@ -12,7 +13,6 @@ import { unwrapStorageType } from '@polkadot/types/primitive/StorageKey'; import { Button, Labelled } from '@polkadot/react-components'; import { withCallDiv } from '@polkadot/react-api/hoc'; import valueToText from '@polkadot/react-params/valueToText'; -import { Option, Raw } from '@polkadot/types'; import { compactStripLength, isU8a, u8aToHex, u8aToString } from '@polkadot/util'; interface Props { diff --git a/packages/page-storage/src/Selection/Consts.tsx b/packages/page-storage/src/Selection/Consts.tsx index 52531e54de..bb572a5550 100644 --- a/packages/page-storage/src/Selection/Consts.tsx +++ b/packages/page-storage/src/Selection/Consts.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-storage authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ConstantCodec } from '@polkadot/metadata/decorate/types'; -import { ConstValue } from '@polkadot/react-components/InputConsts/types'; -import { ComponentProps as Props } from '../types'; +import type { ConstantCodec } from '@polkadot/metadata/decorate/types'; +import type { ConstValue } from '@polkadot/react-components/InputConsts/types'; +import type { ComponentProps as Props } from '../types'; import React, { useCallback, useState } from 'react'; import { Button, InputConsts } from '@polkadot/react-components'; diff --git a/packages/page-storage/src/Selection/Modules.tsx b/packages/page-storage/src/Selection/Modules.tsx index c18bae0e31..b50ac50498 100644 --- a/packages/page-storage/src/Selection/Modules.tsx +++ b/packages/page-storage/src/Selection/Modules.tsx @@ -1,18 +1,19 @@ // Copyright 2017-2020 @polkadot/app-storage authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { QueryableStorageEntry } from '@polkadot/api/types'; -import { StorageEntryTypeLatest } from '@polkadot/types/interfaces'; -import { TypeDef, TypeDefInfo } from '@polkadot/types/types'; -import { RawParams } from '@polkadot/react-params/types'; -import { ComponentProps as Props } from '../types'; +import type { QueryableStorageEntry } from '@polkadot/api/types'; +import type { StorageEntryTypeLatest } from '@polkadot/types/interfaces'; +import type { TypeDef } from '@polkadot/types/types'; +import type { RawParams } from '@polkadot/react-params/types'; +import type { ComponentProps as Props } from '../types'; import React, { useCallback, useState } from 'react'; import { ApiPromise } from '@polkadot/api'; import { Button, InputStorage } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; import Params from '@polkadot/react-params'; -import { getTypeDef } from '@polkadot/types/create'; +import { getTypeDef } from '@polkadot/types'; +import { TypeDefInfo } from '@polkadot/types/types'; import { isNull, isUndefined } from '@polkadot/util'; import { useTranslation } from '../translate'; diff --git a/packages/page-storage/src/Selection/Raw.tsx b/packages/page-storage/src/Selection/Raw.tsx index 939481bd51..b0ae29c02f 100644 --- a/packages/page-storage/src/Selection/Raw.tsx +++ b/packages/page-storage/src/Selection/Raw.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-storage authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ComponentProps as Props } from '../types'; +import type { ComponentProps as Props } from '../types'; import React, { useCallback, useState } from 'react'; import { Button, Input } from '@polkadot/react-components'; diff --git a/packages/page-storage/src/Selection/index.tsx b/packages/page-storage/src/Selection/index.tsx index 6882e29103..5db72c8724 100644 --- a/packages/page-storage/src/Selection/index.tsx +++ b/packages/page-storage/src/Selection/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-storage authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { QueryTypes, ParitalQueryTypes } from '../types'; +import type { QueryTypes, ParitalQueryTypes } from '../types'; import React, { useCallback, useRef } from 'react'; import { Route, Switch } from 'react-router'; diff --git a/packages/page-storage/src/index.tsx b/packages/page-storage/src/index.tsx index d1dd5a4b98..f4a214776c 100644 --- a/packages/page-storage/src/index.tsx +++ b/packages/page-storage/src/index.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-storage authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AppProps as Props } from '@polkadot/react-components/types'; -import { QueryTypes } from './types'; +import type { AppProps as Props } from '@polkadot/react-components/types'; +import type { QueryTypes } from './types'; import React, { useCallback, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-storage/src/types.ts b/packages/page-storage/src/types.ts index f550030ad4..4340274bbb 100644 --- a/packages/page-storage/src/types.ts +++ b/packages/page-storage/src/types.ts @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/app-storage authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { QueryableStorageEntry } from '@polkadot/api/types'; -import { ConstValue } from '@polkadot/react-components/InputConsts/types'; -import { RawParams } from '@polkadot/react-params/types'; +import type { QueryableStorageEntry } from '@polkadot/api/types'; +import type { ConstValue } from '@polkadot/react-components/InputConsts/types'; +import type { RawParams } from '@polkadot/react-params/types'; interface Base { isConst: boolean; diff --git a/packages/page-sudo/src/Sudo.tsx b/packages/page-sudo/src/Sudo.tsx index 9c2a21b58c..2f2f53144a 100644 --- a/packages/page-sudo/src/Sudo.tsx +++ b/packages/page-sudo/src/Sudo.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-js authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; import BN from 'bn.js'; import React, { useCallback, useState } from 'react'; diff --git a/packages/page-sudo/src/index.tsx b/packages/page-sudo/src/index.tsx index 1b215bb586..526abc6659 100644 --- a/packages/page-sudo/src/index.tsx +++ b/packages/page-sudo/src/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-js authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AppProps as Props } from '@polkadot/react-components/types'; +import type { AppProps as Props } from '@polkadot/react-components/types'; import React, { useRef } from 'react'; import { Route, Switch } from 'react-router'; diff --git a/packages/page-tech-comm/src/Overview/Summary.tsx b/packages/page-tech-comm/src/Overview/Summary.tsx index 0600ffddea..5d7a51eb86 100644 --- a/packages/page-tech-comm/src/Overview/Summary.tsx +++ b/packages/page-tech-comm/src/Overview/Summary.tsx @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/app-tech-comm authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ComponentProps as Props } from '../types'; +import type { u32 } from '@polkadot/types'; +import type { ComponentProps as Props } from '../types'; import React from 'react'; import { SummaryBox, CardSummary } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { u32 } from '@polkadot/types'; import { formatNumber } from '@polkadot/util'; import { useTranslation } from '../translate'; diff --git a/packages/page-tech-comm/src/Overview/index.tsx b/packages/page-tech-comm/src/Overview/index.tsx index 7409d97e7f..e4dd3809be 100644 --- a/packages/page-tech-comm/src/Overview/index.tsx +++ b/packages/page-tech-comm/src/Overview/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-tech-comm authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ComponentProps as Props } from '../types'; +import type { ComponentProps as Props } from '../types'; import React from 'react'; diff --git a/packages/page-tech-comm/src/Proposals/Proposal.tsx b/packages/page-tech-comm/src/Proposals/Proposal.tsx index 36c74d48fe..c49de64b55 100644 --- a/packages/page-tech-comm/src/Proposals/Proposal.tsx +++ b/packages/page-tech-comm/src/Proposals/Proposal.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2020 @polkadot/app-tech-comm authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, Hash, Proposal as ProposalType, Votes } from '@polkadot/types/interfaces'; +import type { Option } from '@polkadot/types'; +import type { AccountId, Hash, Proposal as ProposalType, Votes } from '@polkadot/types/interfaces'; import React, { useMemo } from 'react'; import { AddressMini, TxButton } from '@polkadot/react-components'; import { useAccounts, useApi, useCall, useVotingStatus, useWeight } from '@polkadot/react-hooks'; import { BlockToTime } from '@polkadot/react-query'; import ProposalCell from '@polkadot/app-democracy/Overview/ProposalCell'; -import { Option } from '@polkadot/types'; import { formatNumber } from '@polkadot/util'; import { useTranslation } from '../translate'; diff --git a/packages/page-tech-comm/src/Proposals/Propose.tsx b/packages/page-tech-comm/src/Proposals/Propose.tsx index f76680dbde..2a87efb6cf 100644 --- a/packages/page-tech-comm/src/Proposals/Propose.tsx +++ b/packages/page-tech-comm/src/Proposals/Propose.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-tech-comm authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; import BN from 'bn.js'; import React, { useCallback, useState } from 'react'; diff --git a/packages/page-tech-comm/src/Proposals/index.tsx b/packages/page-tech-comm/src/Proposals/index.tsx index 360c05aaa6..75f466d37a 100644 --- a/packages/page-tech-comm/src/Proposals/index.tsx +++ b/packages/page-tech-comm/src/Proposals/index.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-tech-comm authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Hash } from '@polkadot/types/interfaces'; -import { ComponentProps as Props } from '../types'; +import type { Hash } from '@polkadot/types/interfaces'; +import type { ComponentProps as Props } from '../types'; import React, { useRef } from 'react'; import { Button, Table } from '@polkadot/react-components'; diff --git a/packages/page-tech-comm/src/index.tsx b/packages/page-tech-comm/src/index.tsx index fcef29adb6..e98157fef9 100644 --- a/packages/page-tech-comm/src/index.tsx +++ b/packages/page-tech-comm/src/index.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-tech-comm authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Option } from '@polkadot/types'; -import { AccountId, Hash } from '@polkadot/types/interfaces'; +import type { Option } from '@polkadot/types'; +import type { AccountId, Hash } from '@polkadot/types/interfaces'; import React, { useMemo } from 'react'; import { Route, Switch } from 'react-router'; diff --git a/packages/page-treasury/src/Overview/Council.tsx b/packages/page-treasury/src/Overview/Council.tsx index ce2996ff15..241ceff12a 100644 --- a/packages/page-treasury/src/Overview/Council.tsx +++ b/packages/page-treasury/src/Overview/Council.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; -import { ProposalIndex } from '@polkadot/types/interfaces'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { ProposalIndex } from '@polkadot/types/interfaces'; import React, { useEffect, useRef, useState } from 'react'; import { getTreasuryThreshold } from '@polkadot/app-council/thresholds'; diff --git a/packages/page-treasury/src/Overview/Proposal.tsx b/packages/page-treasury/src/Overview/Proposal.tsx index c04417c564..05fc6c3d7c 100644 --- a/packages/page-treasury/src/Overview/Proposal.tsx +++ b/packages/page-treasury/src/Overview/Proposal.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveTreasuryProposal } from '@polkadot/api-derive/types'; +import type { DeriveTreasuryProposal } from '@polkadot/api-derive/types'; import React, { useMemo } from 'react'; import { AddressMini, AddressSmall, LinkExternal } from '@polkadot/react-components'; diff --git a/packages/page-treasury/src/Overview/Proposals.tsx b/packages/page-treasury/src/Overview/Proposals.tsx index a249557dc5..d3c1450dc7 100644 --- a/packages/page-treasury/src/Overview/Proposals.tsx +++ b/packages/page-treasury/src/Overview/Proposals.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveTreasuryProposal } from '@polkadot/api-derive/types'; +import type { DeriveTreasuryProposal } from '@polkadot/api-derive/types'; import React, { useCallback, useMemo } from 'react'; import { useHistory } from 'react-router-dom'; diff --git a/packages/page-treasury/src/Overview/Summary.tsx b/packages/page-treasury/src/Overview/Summary.tsx index e8aa18e572..d47bf4dcb9 100644 --- a/packages/page-treasury/src/Overview/Summary.tsx +++ b/packages/page-treasury/src/Overview/Summary.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveBalancesAccount } from '@polkadot/api-derive/types'; -import { Balance } from '@polkadot/types/interfaces'; +import type { DeriveBalancesAccount } from '@polkadot/api-derive/types'; +import type { Balance } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import React from 'react'; diff --git a/packages/page-treasury/src/Overview/index.tsx b/packages/page-treasury/src/Overview/index.tsx index 4284ab1e70..fa723d06b2 100644 --- a/packages/page-treasury/src/Overview/index.tsx +++ b/packages/page-treasury/src/Overview/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveTreasuryProposals } from '@polkadot/api-derive/types'; +import type { DeriveTreasuryProposals } from '@polkadot/api-derive/types'; import React from 'react'; import { Button } from '@polkadot/react-components'; diff --git a/packages/page-treasury/src/Tips/TipReason.tsx b/packages/page-treasury/src/Tips/TipReason.tsx index 19a2555b1c..eb8635c8b1 100644 --- a/packages/page-treasury/src/Tips/TipReason.tsx +++ b/packages/page-treasury/src/Tips/TipReason.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2020 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Hash } from '@polkadot/types/interfaces'; +import type { Hash } from '@polkadot/types/interfaces'; +import type { Bytes, Option } from '@polkadot/types'; import React from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { Bytes, Option } from '@polkadot/types'; import { hexToString } from '@polkadot/util'; interface Props { diff --git a/packages/page-treasury/src/Tips/Tips.tsx b/packages/page-treasury/src/Tips/Tips.tsx index 06bf33f985..e9a7683974 100644 --- a/packages/page-treasury/src/Tips/Tips.tsx +++ b/packages/page-treasury/src/Tips/Tips.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2020 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { BlockNumber, OpenTip, OpenTipTo225 } from '@polkadot/types/interfaces'; +import type { Option } from '@polkadot/types'; +import type { BlockNumber, OpenTip, OpenTipTo225 } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import React, { useMemo, useRef, useState } from 'react'; import styled from 'styled-components'; import { Table, Toggle } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { Option } from '@polkadot/types'; import { useTranslation } from '../translate'; import Tip from './Tip'; diff --git a/packages/page-treasury/src/Tips/index.tsx b/packages/page-treasury/src/Tips/index.tsx index aeb92466c5..38459d7e15 100644 --- a/packages/page-treasury/src/Tips/index.tsx +++ b/packages/page-treasury/src/Tips/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; import BN from 'bn.js'; import React, { useCallback, useMemo, useState } from 'react'; diff --git a/packages/page-treasury/src/useCounter.ts b/packages/page-treasury/src/useCounter.ts index 048da4f523..295ca66c87 100644 --- a/packages/page-treasury/src/useCounter.ts +++ b/packages/page-treasury/src/useCounter.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveTreasuryProposals } from '@polkadot/api-derive/types'; +import type { DeriveTreasuryProposals } from '@polkadot/api-derive/types'; import { useState, useEffect } from 'react'; import { useAccounts, useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/react-api/src/Api.tsx b/packages/react-api/src/Api.tsx index 9c4290f01f..091b83d63e 100644 --- a/packages/react-api/src/Api.tsx +++ b/packages/react-api/src/Api.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2020 @polkadot/react-api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { InjectedExtension } from '@polkadot/extension-inject/types'; -import { KeyringStore } from '@polkadot/ui-keyring/types'; -import { ChainProperties, ChainType } from '@polkadot/types/interfaces'; -import { ApiProps, ApiState } from './types'; +import type { InjectedExtension } from '@polkadot/extension-inject/types'; +import type { KeyringStore } from '@polkadot/ui-keyring/types'; +import type { ChainProperties, ChainType } from '@polkadot/types/interfaces'; +import type { ApiProps, ApiState } from './types'; import React, { useContext, useEffect, useMemo, useState } from 'react'; import store from 'store'; diff --git a/packages/react-api/src/ApiContext.ts b/packages/react-api/src/ApiContext.ts index 277feabbe7..03b4c64d73 100644 --- a/packages/react-api/src/ApiContext.ts +++ b/packages/react-api/src/ApiContext.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ApiProps } from './types'; +import type { ApiProps } from './types'; import React from 'react'; diff --git a/packages/react-api/src/hoc/api.tsx b/packages/react-api/src/hoc/api.tsx index c14a27d307..b4b3842153 100644 --- a/packages/react-api/src/hoc/api.tsx +++ b/packages/react-api/src/hoc/api.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ApiProps, SubtractProps } from '../types'; -import { DefaultProps } from './types'; +import type { ApiProps, SubtractProps } from '../types'; +import type { DefaultProps } from './types'; import React from 'react'; import { assert } from '@polkadot/util'; diff --git a/packages/react-api/src/hoc/call.tsx b/packages/react-api/src/hoc/call.tsx index 26029d09a2..7a599e818a 100644 --- a/packages/react-api/src/hoc/call.tsx +++ b/packages/react-api/src/hoc/call.tsx @@ -9,8 +9,8 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ -import { ApiProps, CallState as State, SubtractProps } from '../types'; -import { Options } from './types'; +import type { ApiProps, CallState as State, SubtractProps } from '../types'; +import type { Options } from './types'; import React from 'react'; import { assert, isNull, isUndefined } from '@polkadot/util'; diff --git a/packages/react-api/src/hoc/callDiv.tsx b/packages/react-api/src/hoc/callDiv.tsx index 07eb7ac403..9e1fa921fa 100644 --- a/packages/react-api/src/hoc/callDiv.tsx +++ b/packages/react-api/src/hoc/callDiv.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DefaultProps, Options } from './types'; -import { BaseProps } from '../types'; +import type { DefaultProps, Options } from './types'; +import type { BaseProps } from '../types'; import React from 'react'; diff --git a/packages/react-api/src/hoc/calls.ts b/packages/react-api/src/hoc/calls.ts index 7ba7146bf6..db09400c9e 100644 --- a/packages/react-api/src/hoc/calls.ts +++ b/packages/react-api/src/hoc/calls.ts @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ApiProps, SubtractProps } from '../types'; -import { Options } from './types'; +import type { ApiProps, SubtractProps } from '../types'; +import type { Options } from './types'; import React from 'react'; import withCall from './call'; diff --git a/packages/react-api/src/hoc/observable.tsx b/packages/react-api/src/hoc/observable.tsx index 57adb89e6d..3a3d57de42 100644 --- a/packages/react-api/src/hoc/observable.tsx +++ b/packages/react-api/src/hoc/observable.tsx @@ -3,8 +3,8 @@ // TODO: Lots of duplicated code between this and withObservable, surely there is a better way of doing this? -import { CallState } from '../types'; -import { HOC, Options, DefaultProps, RenderFn } from './types'; +import type { CallState } from '../types'; +import type { HOC, Options, DefaultProps, RenderFn } from './types'; import React from 'react'; import { Observable, of } from 'rxjs'; diff --git a/packages/react-api/src/hoc/onlyOn.tsx b/packages/react-api/src/hoc/onlyOn.tsx index 91b3b00eb2..7422184486 100644 --- a/packages/react-api/src/hoc/onlyOn.tsx +++ b/packages/react-api/src/hoc/onlyOn.tsx @@ -1,8 +1,9 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { Environment } from '../types'; + import { ComponentType } from 'react'; -import { Environment } from '../types'; import { getEnvironment } from '../util'; const onlyOn = (environment: Environment) => >(component: T): T | (() => null) => { diff --git a/packages/react-api/src/hoc/types.ts b/packages/react-api/src/hoc/types.ts index b1e526a6ca..200d63ec7b 100644 --- a/packages/react-api/src/hoc/types.ts +++ b/packages/react-api/src/hoc/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { OnChangeCb } from '../types'; +import type { OnChangeCb } from '../types'; import React from 'react'; diff --git a/packages/react-api/src/types.ts b/packages/react-api/src/types.ts index 2d1431d28f..a75bf10926 100644 --- a/packages/react-api/src/types.ts +++ b/packages/react-api/src/types.ts @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { InjectedExtension } from '@polkadot/extension-inject/types'; -import { SubmittableExtrinsicFunction } from '@polkadot/api/promise/types'; +import type { InjectedExtension } from '@polkadot/extension-inject/types'; +import type { SubmittableExtrinsicFunction } from '@polkadot/api/promise/types'; import { ApiPromise } from '@polkadot/api/promise'; diff --git a/packages/react-api/src/util/getEnvironment.ts b/packages/react-api/src/util/getEnvironment.ts index b9170313ea..9e770a1c40 100644 --- a/packages/react-api/src/util/getEnvironment.ts +++ b/packages/react-api/src/util/getEnvironment.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Environment } from '../types'; +import type { Environment } from '../types'; // https://github.com/electron/electron/issues/2288 function isElectron () { diff --git a/packages/react-api/src/util/historic.ts b/packages/react-api/src/util/historic.ts index 7a9ae28b31..6d62f35d7a 100644 --- a/packages/react-api/src/util/historic.ts +++ b/packages/react-api/src/util/historic.ts @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Hash } from '@polkadot/types/interfaces'; -import { Codec } from '@polkadot/types/types'; +import type { Hash } from '@polkadot/types/interfaces'; +import type { Codec } from '@polkadot/types/types'; // eslint-disable-next-line @typescript-eslint/no-unused-vars type AtQuery = (hash: string | Uint8Array, ...params: I) => Promise; diff --git a/packages/react-api/src/util/intervalObservable.ts b/packages/react-api/src/util/intervalObservable.ts index a6ea9ac4b5..ad365a670b 100644 --- a/packages/react-api/src/util/intervalObservable.ts +++ b/packages/react-api/src/util/intervalObservable.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { CallState } from '../types'; +import type { CallState } from '../types'; import { Subscription } from 'rxjs'; import { interval } from 'rxjs/observable/interval'; diff --git a/packages/react-api/src/util/triggerChange.ts b/packages/react-api/src/util/triggerChange.ts index 5a79f8319c..1dd853dcf9 100644 --- a/packages/react-api/src/util/triggerChange.ts +++ b/packages/react-api/src/util/triggerChange.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { OnChangeCb } from '../types'; +import type { OnChangeCb } from '../types'; import { isFunction, isObservable } from '@polkadot/util'; diff --git a/packages/react-components/src/AccountIndex.tsx b/packages/react-components/src/AccountIndex.tsx index 6dbff0d098..86f367daae 100644 --- a/packages/react-components/src/AccountIndex.tsx +++ b/packages/react-components/src/AccountIndex.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, Address } from '@polkadot/types/interfaces'; -import { DeriveAccountInfo } from '@polkadot/api-derive/types'; +import type { DeriveAccountInfo } from '@polkadot/api-derive/types'; +import type { ThemeProps } from '@polkadot/react-components/types'; +import type { AccountId, Address } from '@polkadot/types/interfaces'; import React, { useMemo } from 'react'; -import { ThemeProps } from '@polkadot/react-components/types'; import styled from 'styled-components'; import { useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/react-components/src/AccountName.tsx b/packages/react-components/src/AccountName.tsx index 02f476a97f..483a674644 100644 --- a/packages/react-components/src/AccountName.tsx +++ b/packages/react-components/src/AccountName.tsx @@ -2,11 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import type { IconName } from '@fortawesome/fontawesome-svg-core'; -import { DeriveAccountInfo, DeriveAccountRegistration } from '@polkadot/api-derive/types'; -import { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; +import type { DeriveAccountInfo, DeriveAccountRegistration } from '@polkadot/api-derive/types'; +import type { ThemeProps } from '@polkadot/react-components/types'; +import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; import React, { useCallback, useContext, useEffect, useState } from 'react'; -import { ThemeProps } from '@polkadot/react-components/types'; import styled from 'styled-components'; import registry from '@polkadot/react-api/typeRegistry'; import { AccountSidebarToggle } from '@polkadot/app-accounts/Sidebar'; diff --git a/packages/react-components/src/AddressInfo.tsx b/packages/react-components/src/AddressInfo.tsx index 5efde030e2..4bf8be8a73 100644 --- a/packages/react-components/src/AddressInfo.tsx +++ b/packages/react-components/src/AddressInfo.tsx @@ -2,8 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import { DeriveBalancesAll, DeriveDemocracyLock, DeriveStakingAccount } from '@polkadot/api-derive/types'; -import { BlockNumber, LockIdentifier, ValidatorPrefsTo145 } from '@polkadot/types/interfaces'; +import type { DeriveBalancesAll, DeriveDemocracyLock, DeriveStakingAccount } from '@polkadot/api-derive/types'; +import type { BlockNumber, LockIdentifier, ValidatorPrefsTo145 } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import React from 'react'; diff --git a/packages/react-components/src/AddressMini.tsx b/packages/react-components/src/AddressMini.tsx index 7e777b84cf..b6b6c41765 100644 --- a/packages/react-components/src/AddressMini.tsx +++ b/packages/react-components/src/AddressMini.tsx @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; +import type { KeyringItemType } from '@polkadot/ui-keyring/types'; +import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import React from 'react'; import styled from 'styled-components'; -import { KeyringItemType } from '@polkadot/ui-keyring/types'; import { classes, toShortAddress } from './util'; import AccountName from './AccountName'; diff --git a/packages/react-components/src/AddressToggle.tsx b/packages/react-components/src/AddressToggle.tsx index e7b63c4033..33d0a3607c 100644 --- a/packages/react-components/src/AddressToggle.tsx +++ b/packages/react-components/src/AddressToggle.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveAccountInfo } from '@polkadot/api-derive/types'; +import type { DeriveAccountInfo } from '@polkadot/api-derive/types'; import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/Button/Button.tsx b/packages/react-components/src/Button/Button.tsx index 69abbd03a9..4518bd3ac0 100644 --- a/packages/react-components/src/Button/Button.tsx +++ b/packages/react-components/src/Button/Button.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeProps } from '../types'; -import { ButtonProps } from './types'; +import type { ThemeProps } from '../types'; +import type { ButtonProps } from './types'; import React, { useCallback } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/Button/Group.tsx b/packages/react-components/src/Button/Group.tsx index db8fe1cedf..57f54400b3 100644 --- a/packages/react-components/src/Button/Group.tsx +++ b/packages/react-components/src/Button/Group.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { GroupProps } from './types'; +import type { GroupProps } from './types'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/Button/index.tsx b/packages/react-components/src/Button/index.tsx index 11af920363..9533c25fa3 100644 --- a/packages/react-components/src/Button/index.tsx +++ b/packages/react-components/src/Button/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ButtonType } from './types'; +import type { ButtonType } from './types'; import IButton from './Button'; import Group from './Group'; diff --git a/packages/react-components/src/Button/types.ts b/packages/react-components/src/Button/types.ts index f1c74b65a4..bb2f6ee90f 100644 --- a/packages/react-components/src/Button/types.ts +++ b/packages/react-components/src/Button/types.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { IconName } from '@fortawesome/fontawesome-svg-core'; -import { BareProps } from '../types'; +import type { BareProps } from '../types'; export type Button$Callback = () => void | Promise; diff --git a/packages/react-components/src/Call.tsx b/packages/react-components/src/Call.tsx index f1403aebbb..0449671d64 100644 --- a/packages/react-components/src/Call.tsx +++ b/packages/react-components/src/Call.tsx @@ -1,16 +1,15 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Hash } from '@polkadot/types/interfaces'; -import { Codec, IExtrinsic, IMethod, TypeDef } from '@polkadot/types/types'; +import type { Hash } from '@polkadot/types/interfaces'; +import type { Codec, IExtrinsic, IMethod, TypeDef } from '@polkadot/types/types'; import BN from 'bn.js'; import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; -import { GenericCall } from '@polkadot/types'; -import { getTypeDef } from '@polkadot/types/create'; import Params from '@polkadot/react-params'; import { FormatBalance } from '@polkadot/react-query'; +import { GenericCall, getTypeDef } from '@polkadot/types'; import Static from './Static'; import { classes } from './util'; diff --git a/packages/react-components/src/CardSummary.tsx b/packages/react-components/src/CardSummary.tsx index 3bbd73fa2f..d5379d0c6b 100644 --- a/packages/react-components/src/CardSummary.tsx +++ b/packages/react-components/src/CardSummary.tsx @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeProps } from './types'; +import type { UInt } from '@polkadot/types'; +import type { ThemeProps } from './types'; import BN from 'bn.js'; import React from 'react'; import styled from 'styled-components'; -import { UInt } from '@polkadot/types'; import { formatNumber, isUndefined } from '@polkadot/util'; import Progress from './Progress'; diff --git a/packages/react-components/src/Chart/Base.tsx b/packages/react-components/src/Chart/Base.tsx index 792c0d0d57..73cbf4de9e 100644 --- a/packages/react-components/src/Chart/Base.tsx +++ b/packages/react-components/src/Chart/Base.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { BaseProps } from './types'; +import type { BaseProps } from './types'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/Chart/Doughnut.tsx b/packages/react-components/src/Chart/Doughnut.tsx index 2666b6d296..70146ded63 100644 --- a/packages/react-components/src/Chart/Doughnut.tsx +++ b/packages/react-components/src/Chart/Doughnut.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DoughnutProps } from './types'; +import type { DoughnutProps } from './types'; import React from 'react'; import { Doughnut } from 'react-chartjs-2'; diff --git a/packages/react-components/src/Chart/HorizBar.tsx b/packages/react-components/src/Chart/HorizBar.tsx index 16f69f29e1..4cd2841bfb 100644 --- a/packages/react-components/src/Chart/HorizBar.tsx +++ b/packages/react-components/src/Chart/HorizBar.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { HorizBarProps, HorizBarValue } from './types'; +import type { HorizBarProps, HorizBarValue } from './types'; import React, { useEffect, useState } from 'react'; import ChartJs from 'chart.js'; diff --git a/packages/react-components/src/Chart/Line.tsx b/packages/react-components/src/Chart/Line.tsx index 83302d8b3f..e312e93e85 100644 --- a/packages/react-components/src/Chart/Line.tsx +++ b/packages/react-components/src/Chart/Line.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { LineProps } from './types'; +import type { LineProps } from './types'; import BN from 'bn.js'; import React, { useMemo } from 'react'; diff --git a/packages/react-components/src/Checkbox.tsx b/packages/react-components/src/Checkbox.tsx index b60f992489..184a7df312 100644 --- a/packages/react-components/src/Checkbox.tsx +++ b/packages/react-components/src/Checkbox.tsx @@ -1,10 +1,11 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { ThemeProps } from './types'; + import React, { useCallback } from 'react'; import styled from 'styled-components'; -import { ThemeProps } from './types'; import Icon from './Icon'; interface Props { diff --git a/packages/react-components/src/Collection.tsx b/packages/react-components/src/Collection.tsx index b3c444d262..0978043e73 100644 --- a/packages/react-components/src/Collection.tsx +++ b/packages/react-components/src/Collection.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { I18nProps } from '@polkadot/react-components/types'; +import type { I18nProps } from '@polkadot/react-components/types'; import React from 'react'; diff --git a/packages/react-components/src/DemocracyLocks.tsx b/packages/react-components/src/DemocracyLocks.tsx index 04239a7b5b..c0ccd735cd 100644 --- a/packages/react-components/src/DemocracyLocks.tsx +++ b/packages/react-components/src/DemocracyLocks.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveDemocracyLock } from '@polkadot/api-derive/types'; +import type { DeriveDemocracyLock } from '@polkadot/api-derive/types'; import BN from 'bn.js'; import type { TFunction } from 'i18next'; diff --git a/packages/react-components/src/EditButton.tsx b/packages/react-components/src/EditButton.tsx index 9b1e0784dc..f128e1773f 100644 --- a/packages/react-components/src/EditButton.tsx +++ b/packages/react-components/src/EditButton.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { IconName } from '@fortawesome/fontawesome-svg-core'; -import { VoidFn } from './types'; +import type { VoidFn } from './types'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/ErrorBoundary.tsx b/packages/react-components/src/ErrorBoundary.tsx index 4a513f985e..d799a207f1 100644 --- a/packages/react-components/src/ErrorBoundary.tsx +++ b/packages/react-components/src/ErrorBoundary.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { I18nProps } from './types'; +import type { I18nProps } from './types'; import React from 'react'; diff --git a/packages/react-components/src/Event.tsx b/packages/react-components/src/Event.tsx index c56852accd..e22a654c02 100644 --- a/packages/react-components/src/Event.tsx +++ b/packages/react-components/src/Event.tsx @@ -1,14 +1,15 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DecodedEvent } from '@polkadot/api-contract/types'; -import { Event } from '@polkadot/types/interfaces'; -import { Codec } from '@polkadot/types/types'; +import type { DecodedEvent } from '@polkadot/api-contract/types'; +import type { Bytes } from '@polkadot/types'; +import type { Event } from '@polkadot/types/interfaces'; +import type { Codec } from '@polkadot/types/types'; import React, { useMemo } from 'react'; import { Input } from '@polkadot/react-components'; import Params from '@polkadot/react-params'; -import { Bytes, getTypeDef } from '@polkadot/types'; +import { getTypeDef } from '@polkadot/types'; import { useTranslation } from './translate'; import { classes, getContractAbi } from './util'; diff --git a/packages/react-components/src/Expander.tsx b/packages/react-components/src/Expander.tsx index 1eb96121d3..8ed5ce40be 100644 --- a/packages/react-components/src/Expander.tsx +++ b/packages/react-components/src/Expander.tsx @@ -2,11 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import type { IconName } from '@fortawesome/fontawesome-svg-core'; +import type { Text } from '@polkadot/types'; + import React, { useMemo } from 'react'; import styled from 'styled-components'; import { LabelHelp } from '@polkadot/react-components'; import { useToggle } from '@polkadot/react-hooks'; -import { Text } from '@polkadot/types'; import { useTranslation } from './translate'; import Icon from './Icon'; diff --git a/packages/react-components/src/Extrinsic.tsx b/packages/react-components/src/Extrinsic.tsx index de20d26b89..e08d3c656e 100644 --- a/packages/react-components/src/Extrinsic.tsx +++ b/packages/react-components/src/Extrinsic.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2020 @polkadot/app-extrinsics authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic, SubmittableExtrinsicFunction } from '@polkadot/api/types'; -import { RawParam } from '@polkadot/react-params/types'; -import { TypeDef } from '@polkadot/types/types'; +import type { SubmittableExtrinsic, SubmittableExtrinsicFunction } from '@polkadot/api/types'; +import type { RawParam } from '@polkadot/react-params/types'; +import type { TypeDef } from '@polkadot/types/types'; import React, { useCallback, useEffect, useState } from 'react'; -import { GenericCall } from '@polkadot/types'; import { getTypeDef } from '@polkadot/types/create'; import Params from '@polkadot/react-params'; +import { GenericCall } from '@polkadot/types'; import { isUndefined } from '@polkadot/util'; import InputExtrinsic from './InputExtrinsic'; diff --git a/packages/react-components/src/HelpOverlay.tsx b/packages/react-components/src/HelpOverlay.tsx index eaba33a4be..f318b5dbbc 100644 --- a/packages/react-components/src/HelpOverlay.tsx +++ b/packages/react-components/src/HelpOverlay.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeProps } from './types'; +import type { ThemeProps } from './types'; import React from 'react'; import ReactMd from 'react-markdown'; diff --git a/packages/react-components/src/IdentityIcon/RoboHash/index.tsx b/packages/react-components/src/IdentityIcon/RoboHash/index.tsx index acb0a39d45..4d842a1692 100644 --- a/packages/react-components/src/IdentityIcon/RoboHash/index.tsx +++ b/packages/react-components/src/IdentityIcon/RoboHash/index.tsx @@ -10,7 +10,7 @@ // The Cats/"set4" were created by David Revoy, used under CC-BY-4.0 https://www.peppercarrot.com/en/article391/cat-avatar-generator // The avatars used in "set5" were created by Pablo Stanley, for https://avataaars.com/ They are "Free for personal and commercial use. 😇" -import { ThemeProps } from '../../types'; +import type { ThemeProps } from '../../types'; import React, { useMemo } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/IdentityIcon/index.tsx b/packages/react-components/src/IdentityIcon/index.tsx index 52489c0738..1ca4df107f 100644 --- a/packages/react-components/src/IdentityIcon/index.tsx +++ b/packages/react-components/src/IdentityIcon/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { IdentityProps } from '@polkadot/react-identicon/types'; +import type { IdentityProps } from '@polkadot/react-identicon/types'; import React, { useCallback, useContext } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/Input.tsx b/packages/react-components/src/Input.tsx index acd0d9348b..fbab31dac8 100644 --- a/packages/react-components/src/Input.tsx +++ b/packages/react-components/src/Input.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { VoidFn } from './types'; +import type { VoidFn } from './types'; import React, { useCallback, useState } from 'react'; import SUIInput from 'semantic-ui-react/dist/commonjs/elements/Input/Input'; diff --git a/packages/react-components/src/InputAddress/KeyPair.tsx b/packages/react-components/src/InputAddress/KeyPair.tsx index 9ad6dc16f2..fb3f1e6994 100644 --- a/packages/react-components/src/InputAddress/KeyPair.tsx +++ b/packages/react-components/src/InputAddress/KeyPair.tsx @@ -1,8 +1,9 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { ThemeProps } from '@polkadot/react-components/types'; + import React from 'react'; -import { ThemeProps } from '@polkadot/react-components/types'; import styled from 'styled-components'; import AccountName from '../AccountName'; diff --git a/packages/react-components/src/InputAddress/createHeader.tsx b/packages/react-components/src/InputAddress/createHeader.tsx index fc96e8e9a3..87ca76543a 100644 --- a/packages/react-components/src/InputAddress/createHeader.tsx +++ b/packages/react-components/src/InputAddress/createHeader.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeyringSectionOption } from '@polkadot/ui-keyring/options/types'; +import type { KeyringSectionOption } from '@polkadot/ui-keyring/options/types'; import React from 'react'; diff --git a/packages/react-components/src/InputAddress/createItem.tsx b/packages/react-components/src/InputAddress/createItem.tsx index 36b8e08c56..b117937750 100644 --- a/packages/react-components/src/InputAddress/createItem.tsx +++ b/packages/react-components/src/InputAddress/createItem.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeyringSectionOption } from '@polkadot/ui-keyring/options/types'; -import { Option } from './types'; +import type { KeyringSectionOption } from '@polkadot/ui-keyring/options/types'; +import type { Option } from './types'; import React from 'react'; diff --git a/packages/react-components/src/InputAddress/index.tsx b/packages/react-components/src/InputAddress/index.tsx index 0e4e0226dc..a0480c71fa 100644 --- a/packages/react-components/src/InputAddress/index.tsx +++ b/packages/react-components/src/InputAddress/index.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeyringOptions, KeyringSectionOption, KeyringSectionOptions, KeyringOption$Type } from '@polkadot/ui-keyring/options/types'; -import { Option } from './types'; +import type { KeyringOptions, KeyringSectionOption, KeyringSectionOptions, KeyringOption$Type } from '@polkadot/ui-keyring/options/types'; +import type { Option } from './types'; import React from 'react'; import store from 'store'; diff --git a/packages/react-components/src/InputAddress/types.ts b/packages/react-components/src/InputAddress/types.ts index 08b60c6cd8..a8d109c110 100644 --- a/packages/react-components/src/InputAddress/types.ts +++ b/packages/react-components/src/InputAddress/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeyringSectionOption, KeyringOption$Type } from '@polkadot/ui-keyring/options/types'; +import type { KeyringSectionOption, KeyringOption$Type } from '@polkadot/ui-keyring/options/types'; import React from 'react'; diff --git a/packages/react-components/src/InputBalance.tsx b/packages/react-components/src/InputBalance.tsx index 987a2a8284..8a3c0d9b9e 100644 --- a/packages/react-components/src/InputBalance.tsx +++ b/packages/react-components/src/InputBalance.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { BitLength } from './types'; +import type { BitLength } from './types'; import BN from 'bn.js'; import React, { useMemo } from 'react'; diff --git a/packages/react-components/src/InputConsts/SelectKey.tsx b/packages/react-components/src/InputConsts/SelectKey.tsx index c01875bf30..c34dfe19b1 100644 --- a/packages/react-components/src/InputConsts/SelectKey.tsx +++ b/packages/react-components/src/InputConsts/SelectKey.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DropdownOptions } from '../util/types'; -import { ConstValueBase } from './types'; +import type { DropdownOptions } from '../util/types'; +import type { ConstValueBase } from './types'; import React from 'react'; diff --git a/packages/react-components/src/InputConsts/SelectSection.tsx b/packages/react-components/src/InputConsts/SelectSection.tsx index 8990258f6f..9f49770ba5 100644 --- a/packages/react-components/src/InputConsts/SelectSection.tsx +++ b/packages/react-components/src/InputConsts/SelectSection.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DropdownOptions } from '../util/types'; -import { ConstValueBase, StorageEntryPromise } from './types'; +import type { DropdownOptions } from '../util/types'; +import type { ConstValueBase, StorageEntryPromise } from './types'; import React from 'react'; diff --git a/packages/react-components/src/InputConsts/index.tsx b/packages/react-components/src/InputConsts/index.tsx index e9c000b88c..1eb7c62c42 100644 --- a/packages/react-components/src/InputConsts/index.tsx +++ b/packages/react-components/src/InputConsts/index.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ConstantCodec } from '@polkadot/metadata/decorate/types'; -import { DropdownOptions } from '../util/types'; -import { ConstValue, ConstValueBase } from './types'; +import type { ConstantCodec } from '@polkadot/metadata/decorate/types'; +import type { DropdownOptions } from '../util/types'; +import type { ConstValue, ConstValueBase } from './types'; import React, { useCallback, useState } from 'react'; import { ApiPromise } from '@polkadot/api'; diff --git a/packages/react-components/src/InputConsts/options/key.tsx b/packages/react-components/src/InputConsts/options/key.tsx index 12a3b338fe..bc9662420e 100644 --- a/packages/react-components/src/InputConsts/options/key.tsx +++ b/packages/react-components/src/InputConsts/options/key.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ConstantCodec } from '@polkadot/metadata/decorate/types'; -import { DropdownOptions, DropdownOption } from '../../util/types'; +import type { ConstantCodec } from '@polkadot/metadata/decorate/types'; +import type { DropdownOptions, DropdownOption } from '../../util/types'; import React from 'react'; import { ApiPromise } from '@polkadot/api'; diff --git a/packages/react-components/src/InputConsts/options/section.ts b/packages/react-components/src/InputConsts/options/section.ts index 182f6ffc1e..3d52ff1ac0 100644 --- a/packages/react-components/src/InputConsts/options/section.ts +++ b/packages/react-components/src/InputConsts/options/section.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DropdownOptions } from '../../util/types'; +import type { DropdownOptions } from '../../util/types'; import { ApiPromise } from '@polkadot/api'; diff --git a/packages/react-components/src/InputConsts/types.ts b/packages/react-components/src/InputConsts/types.ts index e58611c18f..ea13e2073d 100644 --- a/packages/react-components/src/InputConsts/types.ts +++ b/packages/react-components/src/InputConsts/types.ts @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { StorageEntryBase } from '@polkadot/api/types'; -import { ModuleConstantMetadataLatest } from '@polkadot/types/interfaces'; +import type { StorageEntryBase } from '@polkadot/api/types'; +import type { ModuleConstantMetadataLatest } from '@polkadot/types/interfaces'; export type StorageEntryPromise = StorageEntryBase<'promise', any>; diff --git a/packages/react-components/src/InputExtrinsic/SelectMethod.tsx b/packages/react-components/src/InputExtrinsic/SelectMethod.tsx index a6d4df2706..800a33e845 100644 --- a/packages/react-components/src/InputExtrinsic/SelectMethod.tsx +++ b/packages/react-components/src/InputExtrinsic/SelectMethod.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsicFunction } from '@polkadot/api/types'; -import { DropdownOptions } from '../util/types'; +import type { SubmittableExtrinsicFunction } from '@polkadot/api/types'; +import type { DropdownOptions } from '../util/types'; import React, { useCallback } from 'react'; import { ApiPromise } from '@polkadot/api'; diff --git a/packages/react-components/src/InputExtrinsic/SelectSection.tsx b/packages/react-components/src/InputExtrinsic/SelectSection.tsx index e93a445fbe..2dfe767d26 100644 --- a/packages/react-components/src/InputExtrinsic/SelectSection.tsx +++ b/packages/react-components/src/InputExtrinsic/SelectSection.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsicFunction } from '@polkadot/api/types'; -import { DropdownOptions } from '../util/types'; +import type { SubmittableExtrinsicFunction } from '@polkadot/api/types'; +import type { DropdownOptions } from '../util/types'; import React from 'react'; diff --git a/packages/react-components/src/InputExtrinsic/index.tsx b/packages/react-components/src/InputExtrinsic/index.tsx index 787153e553..6a69f9fb35 100644 --- a/packages/react-components/src/InputExtrinsic/index.tsx +++ b/packages/react-components/src/InputExtrinsic/index.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsicFunction } from '@polkadot/api/types'; -import { DropdownOptions } from '../util/types'; +import type { SubmittableExtrinsicFunction } from '@polkadot/api/types'; +import type { DropdownOptions } from '../util/types'; import React, { useCallback, useState } from 'react'; import { useApi } from '@polkadot/react-hooks'; diff --git a/packages/react-components/src/InputExtrinsic/options/method.tsx b/packages/react-components/src/InputExtrinsic/options/method.tsx index b7597cf920..2e3bf95fea 100644 --- a/packages/react-components/src/InputExtrinsic/options/method.tsx +++ b/packages/react-components/src/InputExtrinsic/options/method.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DropdownOption, DropdownOptions } from '../../util/types'; +import type { DropdownOption, DropdownOptions } from '../../util/types'; import React from 'react'; import { ApiPromise } from '@polkadot/api'; diff --git a/packages/react-components/src/InputExtrinsic/options/section.ts b/packages/react-components/src/InputExtrinsic/options/section.ts index 841ba5cbfb..e2a0b2f997 100644 --- a/packages/react-components/src/InputExtrinsic/options/section.ts +++ b/packages/react-components/src/InputExtrinsic/options/section.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DropdownOptions } from '../../util/types'; +import type { DropdownOptions } from '../../util/types'; import { ApiPromise } from '@polkadot/api'; diff --git a/packages/react-components/src/InputFile.tsx b/packages/react-components/src/InputFile.tsx index 9b42715704..aae51759e1 100644 --- a/packages/react-components/src/InputFile.tsx +++ b/packages/react-components/src/InputFile.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeProps } from './types'; +import type { ThemeProps } from './types'; import React, { useCallback, useState, createRef } from 'react'; import Dropzone, { DropzoneRef } from 'react-dropzone'; diff --git a/packages/react-components/src/InputNumber.tsx b/packages/react-components/src/InputNumber.tsx index de6ec71015..d1c7375080 100644 --- a/packages/react-components/src/InputNumber.tsx +++ b/packages/react-components/src/InputNumber.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SiDef } from '@polkadot/util/types'; -import { BitLength } from './types'; +import type { SiDef } from '@polkadot/util/types'; +import type { BitLength } from './types'; import BN from 'bn.js'; import React, { useCallback, useEffect, useState } from 'react'; diff --git a/packages/react-components/src/InputRpc/SelectMethod.tsx b/packages/react-components/src/InputRpc/SelectMethod.tsx index fe89f46e9a..ef2a0ebd44 100644 --- a/packages/react-components/src/InputRpc/SelectMethod.tsx +++ b/packages/react-components/src/InputRpc/SelectMethod.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DefinitionRpcExt } from '@polkadot/types/types'; -import { DropdownOptions } from '../util/types'; +import type { DefinitionRpcExt } from '@polkadot/types/types'; +import type { DropdownOptions } from '../util/types'; import React from 'react'; diff --git a/packages/react-components/src/InputRpc/SelectSection.tsx b/packages/react-components/src/InputRpc/SelectSection.tsx index 44fa6e2dba..3d024c3688 100644 --- a/packages/react-components/src/InputRpc/SelectSection.tsx +++ b/packages/react-components/src/InputRpc/SelectSection.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DefinitionRpcExt } from '@polkadot/types/types'; -import { DropdownOptions } from '../util/types'; +import type { DefinitionRpcExt } from '@polkadot/types/types'; +import type { DropdownOptions } from '../util/types'; import React from 'react'; diff --git a/packages/react-components/src/InputRpc/index.tsx b/packages/react-components/src/InputRpc/index.tsx index 5855db3f48..f28f655a76 100644 --- a/packages/react-components/src/InputRpc/index.tsx +++ b/packages/react-components/src/InputRpc/index.tsx @@ -3,8 +3,8 @@ // TODO: We have a lot shared between this and InputExtrinsic & InputStorage -import { DefinitionRpcExt } from '@polkadot/types/types'; -import { DropdownOptions } from '../util/types'; +import type { DefinitionRpcExt } from '@polkadot/types/types'; +import type { DropdownOptions } from '../util/types'; import React, { useCallback, useEffect, useState } from 'react'; import { useApi } from '@polkadot/react-hooks'; diff --git a/packages/react-components/src/InputRpc/options/method.tsx b/packages/react-components/src/InputRpc/options/method.tsx index a0f28d607f..8123765135 100644 --- a/packages/react-components/src/InputRpc/options/method.tsx +++ b/packages/react-components/src/InputRpc/options/method.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DefinitionRpcExt } from '@polkadot/types/types'; -import { DropdownOption, DropdownOptions } from '../../util/types'; +import type { DefinitionRpcExt } from '@polkadot/types/types'; +import type { DropdownOption, DropdownOptions } from '../../util/types'; import React from 'react'; import { ApiPromise } from '@polkadot/api'; diff --git a/packages/react-components/src/InputRpc/options/section.ts b/packages/react-components/src/InputRpc/options/section.ts index d8b533a5b5..975f86b0d0 100644 --- a/packages/react-components/src/InputRpc/options/section.ts +++ b/packages/react-components/src/InputRpc/options/section.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DropdownOptions } from '../../util/types'; +import type { DropdownOptions } from '../../util/types'; import { ApiPromise } from '@polkadot/api'; diff --git a/packages/react-components/src/InputStorage/SelectKey.tsx b/packages/react-components/src/InputStorage/SelectKey.tsx index 47be537ff2..d922e9b119 100644 --- a/packages/react-components/src/InputStorage/SelectKey.tsx +++ b/packages/react-components/src/InputStorage/SelectKey.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { QueryableStorageEntry } from '@polkadot/api/types'; -import { DropdownOptions } from '../util/types'; +import type { QueryableStorageEntry } from '@polkadot/api/types'; +import type { DropdownOptions } from '../util/types'; import React from 'react'; import { ApiPromise } from '@polkadot/api'; diff --git a/packages/react-components/src/InputStorage/SelectSection.tsx b/packages/react-components/src/InputStorage/SelectSection.tsx index 72d0fa8916..ba24e12d98 100644 --- a/packages/react-components/src/InputStorage/SelectSection.tsx +++ b/packages/react-components/src/InputStorage/SelectSection.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { QueryableStorageEntry } from '@polkadot/api/types'; -import { DropdownOptions } from '../util/types'; +import type { QueryableStorageEntry } from '@polkadot/api/types'; +import type { DropdownOptions } from '../util/types'; import React from 'react'; diff --git a/packages/react-components/src/InputStorage/index.tsx b/packages/react-components/src/InputStorage/index.tsx index 752e057aab..c6349cd50f 100644 --- a/packages/react-components/src/InputStorage/index.tsx +++ b/packages/react-components/src/InputStorage/index.tsx @@ -3,8 +3,8 @@ // TODO: We have a lot shared between this and InputExtrinsic -import { QueryableStorageEntry } from '@polkadot/api/types'; -import { DropdownOptions } from '../util/types'; +import type { QueryableStorageEntry } from '@polkadot/api/types'; +import type { DropdownOptions } from '../util/types'; import React, { useCallback, useState } from 'react'; import { useApi } from '@polkadot/react-hooks'; diff --git a/packages/react-components/src/InputStorage/options/key.tsx b/packages/react-components/src/InputStorage/options/key.tsx index 8e15954f94..f644e0779b 100644 --- a/packages/react-components/src/InputStorage/options/key.tsx +++ b/packages/react-components/src/InputStorage/options/key.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { StorageEntry } from '@polkadot/types/primitive/types'; -import { DropdownOptions, DropdownOption } from '../../util/types'; +import type { StorageEntry } from '@polkadot/types/primitive/types'; +import type { DropdownOptions, DropdownOption } from '../../util/types'; import React from 'react'; import { ApiPromise } from '@polkadot/api'; diff --git a/packages/react-components/src/InputStorage/options/section.ts b/packages/react-components/src/InputStorage/options/section.ts index af185b2213..338f43dfa5 100644 --- a/packages/react-components/src/InputStorage/options/section.ts +++ b/packages/react-components/src/InputStorage/options/section.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DropdownOptions } from '../../util/types'; +import type { DropdownOptions } from '../../util/types'; import { ApiPromise } from '@polkadot/api'; diff --git a/packages/react-components/src/LinkExternal.tsx b/packages/react-components/src/LinkExternal.tsx index 71638b96bf..42c99ac191 100644 --- a/packages/react-components/src/LinkExternal.tsx +++ b/packages/react-components/src/LinkExternal.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { LinkTypes } from '@polkadot/apps-config/links/types'; +import type { LinkTypes } from '@polkadot/apps-config/links/types'; import BN from 'bn.js'; import React, { useMemo } from 'react'; diff --git a/packages/react-components/src/Modal/Actions.tsx b/packages/react-components/src/Modal/Actions.tsx index c28870ae37..d033af6786 100644 --- a/packages/react-components/src/Modal/Actions.tsx +++ b/packages/react-components/src/Modal/Actions.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ActionsProps } from './types'; +import type { ActionsProps } from './types'; import React from 'react'; import SUIModal from 'semantic-ui-react/dist/commonjs/modules/Modal/Modal'; diff --git a/packages/react-components/src/Modal/Column.tsx b/packages/react-components/src/Modal/Column.tsx index 548f7bf211..092a63f81b 100644 --- a/packages/react-components/src/Modal/Column.tsx +++ b/packages/react-components/src/Modal/Column.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ColumnProps } from './types'; +import type { ColumnProps } from './types'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/Modal/Columns.tsx b/packages/react-components/src/Modal/Columns.tsx index 48c89e8905..abd9b53377 100644 --- a/packages/react-components/src/Modal/Columns.tsx +++ b/packages/react-components/src/Modal/Columns.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ColumnProps } from './types'; +import type { ColumnProps } from './types'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/Modal/index.tsx b/packages/react-components/src/Modal/index.tsx index 0e96294174..fd95311257 100644 --- a/packages/react-components/src/Modal/index.tsx +++ b/packages/react-components/src/Modal/index.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeDef } from '@polkadot/react-components/types'; -import { ActionsProps, ColumnProps, ModalProps } from './types'; +import type { ThemeDef } from '@polkadot/react-components/types'; +import type { ActionsProps, ColumnProps, ModalProps } from './types'; import React, { useContext } from 'react'; import { ThemeContext } from 'styled-components'; diff --git a/packages/react-components/src/Params/Call.tsx b/packages/react-components/src/Params/Call.tsx index 521de61bf0..5d19f3fa03 100644 --- a/packages/react-components/src/Params/Call.tsx +++ b/packages/react-components/src/Params/Call.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-extrinsics authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsicFunction } from '@polkadot/api/types'; -import { Props } from '@polkadot/react-params/types'; +import type { SubmittableExtrinsicFunction } from '@polkadot/api/types'; +import type { Props } from '@polkadot/react-params/types'; import React from 'react'; import { useApi } from '@polkadot/react-hooks'; diff --git a/packages/react-components/src/Params/Extrinsic.tsx b/packages/react-components/src/Params/Extrinsic.tsx index 4310fb2f3a..e6d0ba208f 100644 --- a/packages/react-components/src/Params/Extrinsic.tsx +++ b/packages/react-components/src/Params/Extrinsic.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-extrinsics authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic, SubmittableExtrinsicFunction } from '@polkadot/api/types'; -import { RawParamOnChange, RawParamOnEnter, RawParamOnEscape } from '@polkadot/react-params/types'; +import type { SubmittableExtrinsic, SubmittableExtrinsicFunction } from '@polkadot/api/types'; +import type { RawParamOnChange, RawParamOnEnter, RawParamOnEscape } from '@polkadot/react-params/types'; import React, { useCallback } from 'react'; diff --git a/packages/react-components/src/Params/OpaqueCall.tsx b/packages/react-components/src/Params/OpaqueCall.tsx index 402d144f3b..6b40441bb0 100644 --- a/packages/react-components/src/Params/OpaqueCall.tsx +++ b/packages/react-components/src/Params/OpaqueCall.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/app-extrinsics authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; -import { Props, RawParam } from '@polkadot/react-params/types'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { Props, RawParam } from '@polkadot/react-params/types'; import React, { useCallback } from 'react'; import { useApi } from '@polkadot/react-hooks'; diff --git a/packages/react-components/src/Params/Proposal.tsx b/packages/react-components/src/Params/Proposal.tsx index 89b2bb1af9..d869a85821 100644 --- a/packages/react-components/src/Params/Proposal.tsx +++ b/packages/react-components/src/Params/Proposal.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-extrinsics authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Props, RawParam } from '@polkadot/react-params/types'; +import type { Props, RawParam } from '@polkadot/react-params/types'; import React, { useCallback } from 'react'; import { registry } from '@polkadot/react-api'; diff --git a/packages/react-components/src/Params/index.ts b/packages/react-components/src/Params/index.ts index 1742d5fd6d..cdcf39ad1d 100644 --- a/packages/react-components/src/Params/index.ts +++ b/packages/react-components/src/Params/index.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-extrinsics authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ComponentMap } from '@polkadot/react-params/types'; +import type { ComponentMap } from '@polkadot/react-params/types'; import Call from './Call'; import OpaqueCall from './OpaqueCall'; diff --git a/packages/react-components/src/PasswordStrength.tsx b/packages/react-components/src/PasswordStrength.tsx index 496aff2c2c..63d5714efe 100644 --- a/packages/react-components/src/PasswordStrength.tsx +++ b/packages/react-components/src/PasswordStrength.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeProps } from './types'; +import type { ThemeProps } from './types'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/Progress.tsx b/packages/react-components/src/Progress.tsx index b82b6dc616..ce4943441d 100644 --- a/packages/react-components/src/Progress.tsx +++ b/packages/react-components/src/Progress.tsx @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeProps } from './types'; +import type { UInt } from '@polkadot/types'; +import type { ThemeProps } from './types'; import BN from 'bn.js'; import React from 'react'; import styled from 'styled-components'; -import { UInt } from '@polkadot/types'; import { bnToBn } from '@polkadot/util'; interface Props { diff --git a/packages/react-components/src/Sidebar.tsx b/packages/react-components/src/Sidebar.tsx index 1181c3f074..689d43bbf0 100644 --- a/packages/react-components/src/Sidebar.tsx +++ b/packages/react-components/src/Sidebar.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeProps } from './types'; +import type { ThemeProps } from './types'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/StakingBonded.tsx b/packages/react-components/src/StakingBonded.tsx index c5aa9c0f16..17b9acef87 100644 --- a/packages/react-components/src/StakingBonded.tsx +++ b/packages/react-components/src/StakingBonded.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveStakingAccount } from '@polkadot/api-derive/types'; +import type { DeriveStakingAccount } from '@polkadot/api-derive/types'; import React from 'react'; import { FormatBalance } from '@polkadot/react-query'; diff --git a/packages/react-components/src/StakingRedeemable.tsx b/packages/react-components/src/StakingRedeemable.tsx index 8b7c629a3f..cfef8db747 100644 --- a/packages/react-components/src/StakingRedeemable.tsx +++ b/packages/react-components/src/StakingRedeemable.tsx @@ -1,13 +1,13 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveStakingAccount } from '@polkadot/api-derive/types'; -import { SlashingSpans } from '@polkadot/types/interfaces'; +import type { DeriveStakingAccount } from '@polkadot/api-derive/types'; +import type { Option } from '@polkadot/types'; +import type { SlashingSpans } from '@polkadot/types/interfaces'; import React from 'react'; import { useAccounts, useApi, useCall } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; -import { Option } from '@polkadot/types'; import TxButton from './TxButton'; import { useTranslation } from './translate'; diff --git a/packages/react-components/src/StakingUnbonding.tsx b/packages/react-components/src/StakingUnbonding.tsx index 7ea943ad1c..7c365a150e 100644 --- a/packages/react-components/src/StakingUnbonding.tsx +++ b/packages/react-components/src/StakingUnbonding.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveSessionProgress, DeriveStakingAccount, DeriveUnlocking } from '@polkadot/api-derive/types'; +import type { DeriveSessionProgress, DeriveStakingAccount, DeriveUnlocking } from '@polkadot/api-derive/types'; import BN from 'bn.js'; import React, { useMemo } from 'react'; diff --git a/packages/react-components/src/Status/Context.ts b/packages/react-components/src/Status/Context.ts index 9405a84753..f5da1accf0 100644 --- a/packages/react-components/src/Status/Context.ts +++ b/packages/react-components/src/Status/Context.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { QueueProps, QueueStatus, QueueTx } from './types'; +import type { QueueProps, QueueStatus, QueueTx } from './types'; import React from 'react'; diff --git a/packages/react-components/src/Status/Queue.tsx b/packages/react-components/src/Status/Queue.tsx index 01983fc997..82666b0b09 100644 --- a/packages/react-components/src/Status/Queue.tsx +++ b/packages/react-components/src/Status/Queue.tsx @@ -1,15 +1,15 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/promise/types'; -import { DispatchError } from '@polkadot/types/interfaces'; -import { ITuple, SignerPayloadJSON } from '@polkadot/types/types'; -import { ActionStatus, ActionStatusPartial, PartialQueueTxExtrinsic, PartialQueueTxRpc, QueueStatus, QueueTx, QueueTxExtrinsic, QueueTxRpc, QueueTxStatus, SignerCallback } from './types'; +import type { SubmittableExtrinsic } from '@polkadot/api/promise/types'; +import type { Bytes } from '@polkadot/types'; +import type { DispatchError } from '@polkadot/types/interfaces'; +import type { ITuple, SignerPayloadJSON } from '@polkadot/types/types'; +import type { ActionStatus, ActionStatusPartial, PartialQueueTxExtrinsic, PartialQueueTxRpc, QueueStatus, QueueTx, QueueTxExtrinsic, QueueTxRpc, QueueTxStatus, SignerCallback } from './types'; import React, { useCallback, useRef, useState } from 'react'; import { SubmittableResult } from '@polkadot/api'; import { registry } from '@polkadot/react-api'; -import { Bytes } from '@polkadot/types'; import jsonrpc from '@polkadot/types/interfaces/jsonrpc'; import { getContractAbi } from '../util'; diff --git a/packages/react-components/src/Status/constants.ts b/packages/react-components/src/Status/constants.ts index 64f6c432b8..480e5e2add 100644 --- a/packages/react-components/src/Status/constants.ts +++ b/packages/react-components/src/Status/constants.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { QueueTxStatus } from './types'; +import type { QueueTxStatus } from './types'; export const STATUS_COMPLETE: QueueTxStatus[] = [ // status from subscription diff --git a/packages/react-components/src/Status/index.tsx b/packages/react-components/src/Status/index.tsx index aaa592dc34..ba920766a7 100644 --- a/packages/react-components/src/Status/index.tsx +++ b/packages/react-components/src/Status/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { QueueStatus, QueueTx, QueueTxStatus } from './types'; +import type { QueueStatus, QueueTx, QueueTxStatus } from './types'; import React, { useCallback, useContext, useEffect, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/Status/types.ts b/packages/react-components/src/Status/types.ts index 3c13545557..aa60bcf6c5 100644 --- a/packages/react-components/src/Status/types.ts +++ b/packages/react-components/src/Status/types.ts @@ -1,11 +1,11 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableResult } from '@polkadot/api'; -import { SubmittableExtrinsic } from '@polkadot/api/promise/types'; -import { SignerResult } from '@polkadot/api/types'; -import { AccountId, Address } from '@polkadot/types/interfaces'; -import { DefinitionRpcExt, SignerPayloadJSON } from '@polkadot/types/types'; +import type { SubmittableResult } from '@polkadot/api'; +import type { SubmittableExtrinsic } from '@polkadot/api/promise/types'; +import type { SignerResult } from '@polkadot/api/types'; +import type { AccountId, Address } from '@polkadot/types/interfaces'; +import type { DefinitionRpcExt, SignerPayloadJSON } from '@polkadot/types/types'; export type Actions = 'create' | 'edit' | 'restore' | 'forget' | 'backup' | 'changePassword' | 'transfer'; diff --git a/packages/react-components/src/Table/Body.tsx b/packages/react-components/src/Table/Body.tsx index ab4f951209..93da72c535 100644 --- a/packages/react-components/src/Table/Body.tsx +++ b/packages/react-components/src/Table/Body.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeProps } from '../types'; +import type { ThemeProps } from '../types'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/Table/Foot.tsx b/packages/react-components/src/Table/Foot.tsx index 5aaf7ceb7b..5bba1d2403 100644 --- a/packages/react-components/src/Table/Foot.tsx +++ b/packages/react-components/src/Table/Foot.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeProps } from '../types'; +import type { ThemeProps } from '../types'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/Table/Head.tsx b/packages/react-components/src/Table/Head.tsx index 645dfa0aaf..2d12c7e7d9 100644 --- a/packages/react-components/src/Table/Head.tsx +++ b/packages/react-components/src/Table/Head.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeProps } from '../types'; +import type { ThemeProps } from '../types'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/Tabs/Tab.tsx b/packages/react-components/src/Tabs/Tab.tsx index c4cfd4128b..eb77e07543 100644 --- a/packages/react-components/src/Tabs/Tab.tsx +++ b/packages/react-components/src/Tabs/Tab.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeProps } from '../types'; -import { TabItem } from './types'; +import type { ThemeProps } from '../types'; +import type { TabItem } from './types'; import React from 'react'; import { NavLink } from 'react-router-dom'; diff --git a/packages/react-components/src/Tabs/index.tsx b/packages/react-components/src/Tabs/index.tsx index 009d95d47d..0e05c8ca31 100644 --- a/packages/react-components/src/Tabs/index.tsx +++ b/packages/react-components/src/Tabs/index.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeProps } from '../types'; -import { TabItem } from './types'; +import type { ThemeProps } from '../types'; +import type { TabItem } from './types'; import React, { useEffect } from 'react'; import { useLocation } from 'react-router-dom'; diff --git a/packages/react-components/src/Tags.tsx b/packages/react-components/src/Tags.tsx index ca4cb55034..55922284af 100644 --- a/packages/react-components/src/Tags.tsx +++ b/packages/react-components/src/Tags.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { VoidFn } from './types'; +import type { VoidFn } from './types'; import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/TextArea.tsx b/packages/react-components/src/TextArea.tsx index affbd1d398..049175a80a 100644 --- a/packages/react-components/src/TextArea.tsx +++ b/packages/react-components/src/TextArea.tsx @@ -1,11 +1,12 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { ThemeProps } from './types'; + import React, { useCallback } from 'react'; import styled from 'styled-components'; -import { Labelled } from '.'; -import { ThemeProps } from './types'; +import Labelled from './Labelled'; interface Props { children?: React.ReactNode; @@ -58,7 +59,7 @@ export default React.memo(styled(TextArea)(({ theme }: ThemeProps) => ` textarea { border-radius: 0.25rem 0 0 0.25rem; border: 1px solid #DDE1EB; - border-right: none; + border-right: none; background: ${theme.bgInput}; box-sizing: border-box; color: ${theme.color}; @@ -67,23 +68,23 @@ export default React.memo(styled(TextArea)(({ theme }: ThemeProps) => ` padding: 1.75rem 3rem 0.75rem 1.5rem; resize: none; width: 100%; - + &:read-only { background: ${theme.bgInverse}; box-shadow: none; outline: none; - + ~ .ui.buttons > .ui.selection.dropdown { background: ${theme.bgInverse}; } } - + &.ui-textArea-withError { background: ${theme.bgInputError}; color: ${theme.colorError}; } } - + & > .ui.buttons > .ui.button.floating.selection.dropdown { border: 1px solid #DDE1EB; border-left: none; diff --git a/packages/react-components/src/Toggle.tsx b/packages/react-components/src/Toggle.tsx index bb57971b9b..3dc3edc372 100644 --- a/packages/react-components/src/Toggle.tsx +++ b/packages/react-components/src/Toggle.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeProps } from './types'; +import type { ThemeProps } from './types'; import React, { useCallback } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/TreasuryProposal.tsx b/packages/react-components/src/TreasuryProposal.tsx index 33c8235234..2946b80988 100644 --- a/packages/react-components/src/TreasuryProposal.tsx +++ b/packages/react-components/src/TreasuryProposal.tsx @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { TreasuryProposal as TreasuryProposalType } from '@polkadot/types/interfaces'; +import type { Option } from '@polkadot/types'; +import type { TreasuryProposal as TreasuryProposalType } from '@polkadot/types/interfaces'; import React, { useEffect, useState } from 'react'; import { InputAddress, Labelled, Static } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; -import { Option } from '@polkadot/types'; import { FormatBalance } from '@polkadot/react-query'; import Inset, { InsetProps } from './Inset'; diff --git a/packages/react-components/src/TxButton.tsx b/packages/react-components/src/TxButton.tsx index 2debed63da..eb4eddef88 100644 --- a/packages/react-components/src/TxButton.tsx +++ b/packages/react-components/src/TxButton.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; -import { TxButtonProps as Props } from './types'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { TxButtonProps as Props } from './types'; import React, { useCallback, useContext, useEffect, useState } from 'react'; import { SubmittableResult } from '@polkadot/api'; diff --git a/packages/react-components/src/TxModal.tsx b/packages/react-components/src/TxModal.tsx index 1b03049bae..eab28b5218 100644 --- a/packages/react-components/src/TxModal.tsx +++ b/packages/react-components/src/TxModal.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { I18nProps } from '@polkadot/react-components/types'; +import type { I18nProps } from '@polkadot/react-components/types'; import React from 'react'; import { InputAddress, Modal, TxButton, TxComponent } from '@polkadot/react-components'; diff --git a/packages/react-components/src/TxModalNew.tsx b/packages/react-components/src/TxModalNew.tsx index f29a0ba8b4..8739de43b2 100644 --- a/packages/react-components/src/TxModalNew.tsx +++ b/packages/react-components/src/TxModalNew.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { TxModalProps as Props } from './types'; +import type { TxModalProps as Props } from './types'; import React, { useState, useEffect } from 'react'; import { Button, InputAddress, Modal } from '@polkadot/react-components'; diff --git a/packages/react-components/src/VoteValue.tsx b/packages/react-components/src/VoteValue.tsx index c8c0412a30..8222a29cdb 100644 --- a/packages/react-components/src/VoteValue.tsx +++ b/packages/react-components/src/VoteValue.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveBalancesAll } from '@polkadot/api-derive/types'; +import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; import BN from 'bn.js'; import React, { useCallback, useEffect, useState } from 'react'; diff --git a/packages/react-components/src/styles/components.ts b/packages/react-components/src/styles/components.ts index b4a1952be8..af0401df34 100644 --- a/packages/react-components/src/styles/components.ts +++ b/packages/react-components/src/styles/components.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeDef } from '../types'; +import type { ThemeDef } from '../types'; export default (theme: ThemeDef): string => ` .ui--output { diff --git a/packages/react-components/src/styles/index.ts b/packages/react-components/src/styles/index.ts index ea20582e91..639997d6a1 100644 --- a/packages/react-components/src/styles/index.ts +++ b/packages/react-components/src/styles/index.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeProps } from '../types'; +import type { ThemeProps } from '../types'; import { createGlobalStyle } from 'styled-components'; diff --git a/packages/react-components/src/styles/semantic.ts b/packages/react-components/src/styles/semantic.ts index d54fafbe0e..c3a0d84f53 100644 --- a/packages/react-components/src/styles/semantic.ts +++ b/packages/react-components/src/styles/semantic.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeDef } from '../types'; +import type { ThemeDef } from '../types'; export default (theme: ThemeDef): string => ` .ui.hidden.divider { diff --git a/packages/react-components/src/types.ts b/packages/react-components/src/types.ts index d1873fe78e..2cf3e6958e 100644 --- a/packages/react-components/src/types.ts +++ b/packages/react-components/src/types.ts @@ -1,16 +1,16 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { WithTranslation } from 'react-i18next'; +import type { WithTranslation } from 'react-i18next'; import type { IconName } from '@fortawesome/fontawesome-svg-core'; -import { SubmittableExtrinsic } from '@polkadot/api/promise/types'; -import { Abi } from '@polkadot/api-contract'; -import { ActionStatus } from '@polkadot/react-components/Status/types'; -import { TxState } from '@polkadot/react-hooks/types'; -import { AccountId, Index } from '@polkadot/types/interfaces'; -import { ButtonProps } from './Button/types'; -import { InputAddressProps } from './InputAddress/types'; -import { TxCallback, TxFailedCallback } from './Status/types'; +import type { SubmittableExtrinsic } from '@polkadot/api/promise/types'; +import type { Abi } from '@polkadot/api-contract'; +import type { ActionStatus } from '@polkadot/react-components/Status/types'; +import type { TxState } from '@polkadot/react-hooks/types'; +import type { AccountId, Index } from '@polkadot/types/interfaces'; +import type { ButtonProps } from './Button/types'; +import type { InputAddressProps } from './InputAddress/types'; +import type { TxCallback, TxFailedCallback } from './Status/types'; export type StringOrNull = string | null; diff --git a/packages/react-components/src/util/checkVisibility.tsx b/packages/react-components/src/util/checkVisibility.tsx index e9bfbc8102..372e9a8f7c 100644 --- a/packages/react-components/src/util/checkVisibility.tsx +++ b/packages/react-components/src/util/checkVisibility.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveAccountInfo } from '@polkadot/api-derive/types'; +import type { DeriveAccountInfo } from '@polkadot/api-derive/types'; import { ApiPromise } from '@polkadot/api'; import keyring from '@polkadot/ui-keyring'; diff --git a/packages/react-components/src/util/getAddressMeta.ts b/packages/react-components/src/util/getAddressMeta.ts index 82836e9f3a..80eccc7bf1 100644 --- a/packages/react-components/src/util/getAddressMeta.ts +++ b/packages/react-components/src/util/getAddressMeta.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeyringItemType, KeyringJson$Meta } from '@polkadot/ui-keyring/types'; +import type { KeyringItemType, KeyringJson$Meta } from '@polkadot/ui-keyring/types'; import keyring from '@polkadot/ui-keyring'; diff --git a/packages/react-components/src/util/getAddressName.ts b/packages/react-components/src/util/getAddressName.ts index b6a9343f8b..f1c2c62e88 100644 --- a/packages/react-components/src/util/getAddressName.ts +++ b/packages/react-components/src/util/getAddressName.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeyringItemType } from '@polkadot/ui-keyring/types'; +import type { KeyringItemType } from '@polkadot/ui-keyring/types'; import getAddressMeta from './getAddressMeta'; import toShortAddress from './toShortAddress'; diff --git a/packages/react-components/src/util/getAddressTags.ts b/packages/react-components/src/util/getAddressTags.ts index 78844c50a9..540b08345b 100644 --- a/packages/react-components/src/util/getAddressTags.ts +++ b/packages/react-components/src/util/getAddressTags.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeyringItemType } from '@polkadot/ui-keyring/types'; +import type { KeyringItemType } from '@polkadot/ui-keyring/types'; import getAddressMeta from './getAddressMeta'; diff --git a/packages/react-components/src/util/getContractAbi.ts b/packages/react-components/src/util/getContractAbi.ts index 3abcd0c6b0..9ceff10e82 100644 --- a/packages/react-components/src/util/getContractAbi.ts +++ b/packages/react-components/src/util/getContractAbi.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AnyJson } from '@polkadot/types/types'; +import type { AnyJson } from '@polkadot/types/types'; import { Abi } from '@polkadot/api-contract'; import { api } from '@polkadot/react-api'; diff --git a/packages/react-hooks/src/types.ts b/packages/react-hooks/src/types.ts index 16ba99308d..a4a4855eba 100644 --- a/packages/react-hooks/src/types.ts +++ b/packages/react-hooks/src/types.ts @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/promise/types'; -import { DeriveAccountFlags, DeriveAccountRegistration } from '@polkadot/api-derive/types'; -import { ConstructTxFn, StringOrNull, VoidFn } from '@polkadot/react-components/types'; -import { AccountId, Balance, BlockNumber, Call, Exposure, Hash, RewardDestination, SessionIndex, StakingLedger, ValidatorPrefs } from '@polkadot/types/interfaces'; -import { IExtrinsic } from '@polkadot/types/types'; -import { KeyringJson$Meta } from '@polkadot/ui-keyring/types'; +import type { SubmittableExtrinsic } from '@polkadot/api/promise/types'; +import type { DeriveAccountFlags, DeriveAccountRegistration } from '@polkadot/api-derive/types'; +import type { ConstructTxFn, StringOrNull, VoidFn } from '@polkadot/react-components/types'; +import type { AccountId, Balance, BlockNumber, Call, Exposure, Hash, RewardDestination, SessionIndex, StakingLedger, ValidatorPrefs } from '@polkadot/types/interfaces'; +import type { IExtrinsic } from '@polkadot/types/types'; +import type { KeyringJson$Meta } from '@polkadot/ui-keyring/types'; export type CallParam = any; diff --git a/packages/react-hooks/src/useAccountId.ts b/packages/react-hooks/src/useAccountId.ts index 4e95812345..b3708cb9c4 100644 --- a/packages/react-hooks/src/useAccountId.ts +++ b/packages/react-hooks/src/useAccountId.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { StringOrNull } from '@polkadot/react-components/types'; +import type { StringOrNull } from '@polkadot/react-components/types'; import { useCallback, useState } from 'react'; diff --git a/packages/react-hooks/src/useAccountInfo.ts b/packages/react-hooks/src/useAccountInfo.ts index f9d456f453..ef77718963 100644 --- a/packages/react-hooks/src/useAccountInfo.ts +++ b/packages/react-hooks/src/useAccountInfo.ts @@ -1,10 +1,10 @@ // Copyright 2017-2020 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveAccountFlags, DeriveAccountInfo } from '@polkadot/api-derive/types'; -import { StringOrNull } from '@polkadot/react-components/types'; -import { KeyringJson$Meta } from '@polkadot/ui-keyring/types'; -import { AddressFlags, AddressIdentity, UseAccountInfo } from './types'; +import type { DeriveAccountFlags, DeriveAccountInfo } from '@polkadot/api-derive/types'; +import type { StringOrNull } from '@polkadot/react-components/types'; +import type { KeyringJson$Meta } from '@polkadot/ui-keyring/types'; +import type { AddressFlags, AddressIdentity, UseAccountInfo } from './types'; import { useCallback, useEffect, useState } from 'react'; import keyring from '@polkadot/ui-keyring'; diff --git a/packages/react-hooks/src/useApi.ts b/packages/react-hooks/src/useApi.ts index 2f2760ad7f..f42afb9cca 100644 --- a/packages/react-hooks/src/useApi.ts +++ b/packages/react-hooks/src/useApi.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ApiProps } from '@polkadot/react-api/types'; +import type { ApiProps } from '@polkadot/react-api/types'; import { useContext } from 'react'; import { ApiContext } from '@polkadot/react-api'; diff --git a/packages/react-hooks/src/useAvailableSlashes.ts b/packages/react-hooks/src/useAvailableSlashes.ts index a2bcb16fad..24434183fb 100644 --- a/packages/react-hooks/src/useAvailableSlashes.ts +++ b/packages/react-hooks/src/useAvailableSlashes.ts @@ -1,13 +1,13 @@ // Copyright 2017-2020 @polkadot/app-council authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveSessionIndexes } from '@polkadot/api-derive/types'; -import { EraIndex, UnappliedSlash } from '@polkadot/types/interfaces'; +import type { DeriveSessionIndexes } from '@polkadot/api-derive/types'; +import type { Option, Vec } from '@polkadot/types'; +import type { EraIndex, UnappliedSlash } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import { useEffect, useState } from 'react'; import { useApi, useCall, useIsMountedRef } from '@polkadot/react-hooks'; -import { Option, Vec } from '@polkadot/types'; type Unsub = () => void; diff --git a/packages/react-hooks/src/useCall.ts b/packages/react-hooks/src/useCall.ts index d3a56b8016..0691354d75 100644 --- a/packages/react-hooks/src/useCall.ts +++ b/packages/react-hooks/src/useCall.ts @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Codec } from '@polkadot/types/types'; +import type { Codec } from '@polkadot/types/types'; // eslint-disable-next-line @typescript-eslint/no-unused-vars -import { CallOptions, CallParam, CallParams } from './types'; +import type { CallOptions, CallParam, CallParams } from './types'; import { useEffect, useRef, useState } from 'react'; import { isNull, isUndefined } from '@polkadot/util'; diff --git a/packages/react-hooks/src/useModal.ts b/packages/react-hooks/src/useModal.ts index fe15e5a8a3..d6d91cb3ef 100644 --- a/packages/react-hooks/src/useModal.ts +++ b/packages/react-hooks/src/useModal.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ModalState } from './types'; +import type { ModalState } from './types'; import { useCallback } from 'react'; diff --git a/packages/react-hooks/src/useOwnEraRewards.ts b/packages/react-hooks/src/useOwnEraRewards.ts index 028f6266ee..367e081944 100644 --- a/packages/react-hooks/src/useOwnEraRewards.ts +++ b/packages/react-hooks/src/useOwnEraRewards.ts @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveEraPoints, DeriveEraRewards, DeriveStakerReward } from '@polkadot/api-derive/types'; -import { EraIndex } from '@polkadot/types/interfaces'; -import { StakerState } from './types'; +import type { DeriveEraPoints, DeriveEraRewards, DeriveStakerReward } from '@polkadot/api-derive/types'; +import type { EraIndex } from '@polkadot/types/interfaces'; +import type { StakerState } from './types'; import { useEffect, useState } from 'react'; import { registry } from '@polkadot/react-api'; diff --git a/packages/react-hooks/src/useOwnStashInfos.ts b/packages/react-hooks/src/useOwnStashInfos.ts index db6503bc5f..70bd19c6bc 100644 --- a/packages/react-hooks/src/useOwnStashInfos.ts +++ b/packages/react-hooks/src/useOwnStashInfos.ts @@ -1,10 +1,10 @@ // Copyright 2017-2020 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveStakingAccount } from '@polkadot/api-derive/types'; -import { AccountId, ValidatorPrefs } from '@polkadot/types/interfaces'; -import { Codec, ITuple } from '@polkadot/types/types'; -import { StakerState } from './types'; +import type { DeriveStakingAccount } from '@polkadot/api-derive/types'; +import type { AccountId, ValidatorPrefs } from '@polkadot/types/interfaces'; +import type { Codec, ITuple } from '@polkadot/types/types'; +import type { StakerState } from './types'; import { useEffect, useMemo, useState } from 'react'; import { u8aConcat, u8aToHex } from '@polkadot/util'; diff --git a/packages/react-hooks/src/useOwnStashes.ts b/packages/react-hooks/src/useOwnStashes.ts index 4e124f0dd6..6d92d3b5eb 100644 --- a/packages/react-hooks/src/useOwnStashes.ts +++ b/packages/react-hooks/src/useOwnStashes.ts @@ -1,10 +1,10 @@ // Copyright 2017-2020 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, StakingLedger } from '@polkadot/types/interfaces'; +import type { Option } from '@polkadot/types'; +import type { AccountId, StakingLedger } from '@polkadot/types/interfaces'; import { useMemo } from 'react'; -import { Option } from '@polkadot/types'; import { useAccounts } from './useAccounts'; import { useApi } from './useApi'; diff --git a/packages/react-hooks/src/useRegistrars.ts b/packages/react-hooks/src/useRegistrars.ts index a4b7308574..b2d96e13e9 100644 --- a/packages/react-hooks/src/useRegistrars.ts +++ b/packages/react-hooks/src/useRegistrars.ts @@ -1,10 +1,10 @@ // Copyright 2017-2020 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { RegistrarInfo } from '@polkadot/types/interfaces'; +import type { Option } from '@polkadot/types'; +import type { RegistrarInfo } from '@polkadot/types/interfaces'; import { useMemo } from 'react'; -import { Option } from '@polkadot/types'; import { useAccounts } from './useAccounts'; import { useApi } from './useApi'; diff --git a/packages/react-hooks/src/useSudo.ts b/packages/react-hooks/src/useSudo.ts index fbcbe924c7..e23bab90ae 100644 --- a/packages/react-hooks/src/useSudo.ts +++ b/packages/react-hooks/src/useSudo.ts @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId } from '@polkadot/types/interfaces'; -import { UseSudo } from './types'; +import type { AccountId } from '@polkadot/types/interfaces'; +import type { UseSudo } from './types'; import { useEffect, useState } from 'react'; diff --git a/packages/react-params/src/Holder.tsx b/packages/react-params/src/Holder.tsx index b297819329..93fbe43285 100644 --- a/packages/react-params/src/Holder.tsx +++ b/packages/react-params/src/Holder.tsx @@ -1,8 +1,9 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { ThemeProps } from '@polkadot/react-components/types'; + import React from 'react'; -import { ThemeProps } from '@polkadot/react-components/types'; import styled from 'styled-components'; interface Props { diff --git a/packages/react-params/src/Param/Account.tsx b/packages/react-params/src/Param/Account.tsx index a026b7b4c7..49041087eb 100644 --- a/packages/react-params/src/Param/Account.tsx +++ b/packages/react-params/src/Param/Account.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Props } from '../types'; +import type { Props } from '../types'; import React, { useCallback, useState } from 'react'; import { InputAddress } from '@polkadot/react-components'; diff --git a/packages/react-params/src/Param/Amount.tsx b/packages/react-params/src/Param/Amount.tsx index 0474966d54..703b7515d7 100644 --- a/packages/react-params/src/Param/Amount.tsx +++ b/packages/react-params/src/Param/Amount.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Props } from '../types'; +import type { Props } from '../types'; import BN from 'bn.js'; import React, { useCallback, useMemo } from 'react'; diff --git a/packages/react-params/src/Param/Balance.tsx b/packages/react-params/src/Param/Balance.tsx index ddc3a82e57..6c1011f78c 100644 --- a/packages/react-params/src/Param/Balance.tsx +++ b/packages/react-params/src/Param/Balance.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Props } from '../types'; +import type { Props } from '../types'; import BN from 'bn.js'; import React, { useCallback, useState } from 'react'; diff --git a/packages/react-params/src/Param/Base.tsx b/packages/react-params/src/Param/Base.tsx index 897ba7b124..ce3469a63b 100644 --- a/packages/react-params/src/Param/Base.tsx +++ b/packages/react-params/src/Param/Base.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Size } from '../types'; +import type { Size } from '../types'; import React from 'react'; import { Labelled } from '@polkadot/react-components'; diff --git a/packages/react-params/src/Param/BaseBytes.tsx b/packages/react-params/src/Param/BaseBytes.tsx index ff1533d8dc..b2b6f445d6 100644 --- a/packages/react-params/src/Param/BaseBytes.tsx +++ b/packages/react-params/src/Param/BaseBytes.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { TypeDef } from '@polkadot/types/types'; -import { RawParam, RawParamOnChange, RawParamOnEnter, RawParamOnEscape, Size } from '../types'; +import type { TypeDef } from '@polkadot/types/types'; +import type { RawParam, RawParamOnChange, RawParamOnEnter, RawParamOnEscape, Size } from '../types'; import React, { useCallback, useState } from 'react'; import { Input } from '@polkadot/react-components'; diff --git a/packages/react-params/src/Param/Bool.tsx b/packages/react-params/src/Param/Bool.tsx index 57035627a0..eb863e598e 100644 --- a/packages/react-params/src/Param/Bool.tsx +++ b/packages/react-params/src/Param/Bool.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Props } from '../types'; +import type { Props } from '../types'; import React, { useCallback, useMemo, useState } from 'react'; import { Dropdown } from '@polkadot/react-components'; diff --git a/packages/react-params/src/Param/Bytes.tsx b/packages/react-params/src/Param/Bytes.tsx index 9a84a8b97f..e6f2309c6d 100644 --- a/packages/react-params/src/Param/Bytes.tsx +++ b/packages/react-params/src/Param/Bytes.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Props } from '../types'; +import type { Props } from '../types'; import React, { useCallback, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-params/src/Param/Call.tsx b/packages/react-params/src/Param/Call.tsx index deea88db56..e5b9a87981 100644 --- a/packages/react-params/src/Param/Call.tsx +++ b/packages/react-params/src/Param/Call.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Extrinsic } from '@polkadot/types/interfaces'; -import { Props } from '../types'; +import type { Extrinsic } from '@polkadot/types/interfaces'; +import type { Props } from '../types'; import React from 'react'; import { Call, Static } from '@polkadot/react-components'; diff --git a/packages/react-params/src/Param/Code.tsx b/packages/react-params/src/Param/Code.tsx index 1c37b72660..c2dd816c71 100644 --- a/packages/react-params/src/Param/Code.tsx +++ b/packages/react-params/src/Param/Code.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Props } from '../types'; +import type { Props } from '../types'; import React, { useCallback, useState } from 'react'; import { isWasm } from '@polkadot/util'; diff --git a/packages/react-params/src/Param/DispatchError.tsx b/packages/react-params/src/Param/DispatchError.tsx index 394af45032..8e7091076b 100644 --- a/packages/react-params/src/Param/DispatchError.tsx +++ b/packages/react-params/src/Param/DispatchError.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DispatchError } from '@polkadot/types/interfaces'; -import { Props } from '../types'; +import type { DispatchError } from '@polkadot/types/interfaces'; +import type { Props } from '../types'; import React, { useEffect, useState } from 'react'; import { Input } from '@polkadot/react-components'; diff --git a/packages/react-params/src/Param/Enum.tsx b/packages/react-params/src/Param/Enum.tsx index 75992f90e9..08dc6dbf5f 100644 --- a/packages/react-params/src/Param/Enum.tsx +++ b/packages/react-params/src/Param/Enum.tsx @@ -1,13 +1,12 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { TypeDef } from '@polkadot/types/types'; -import { ParamDef, Props, RawParam } from '../types'; +import type { TypeDef } from '@polkadot/types/types'; +import type { ParamDef, Props, RawParam } from '../types'; import React, { useCallback, useEffect, useState } from 'react'; import { Dropdown } from '@polkadot/react-components'; -import { Enum } from '@polkadot/types'; -import { getTypeDef } from '@polkadot/types/create'; +import { Enum, getTypeDef } from '@polkadot/types'; import Params from '../'; import Bare from './Bare'; diff --git a/packages/react-params/src/Param/Hash160.tsx b/packages/react-params/src/Param/Hash160.tsx index 4d48143ef7..f2f3bd6942 100644 --- a/packages/react-params/src/Param/Hash160.tsx +++ b/packages/react-params/src/Param/Hash160.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Props } from '../types'; +import type { Props } from '../types'; import React from 'react'; diff --git a/packages/react-params/src/Param/Hash256.tsx b/packages/react-params/src/Param/Hash256.tsx index 2b44abc04b..a63dd80c0e 100644 --- a/packages/react-params/src/Param/Hash256.tsx +++ b/packages/react-params/src/Param/Hash256.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Props } from '../types'; +import type { Props } from '../types'; import React from 'react'; diff --git a/packages/react-params/src/Param/Hash512.tsx b/packages/react-params/src/Param/Hash512.tsx index 6e9d8dd52c..93cbf36a94 100644 --- a/packages/react-params/src/Param/Hash512.tsx +++ b/packages/react-params/src/Param/Hash512.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Props } from '../types'; +import type { Props } from '../types'; import React from 'react'; diff --git a/packages/react-params/src/Param/KeyValue.tsx b/packages/react-params/src/Param/KeyValue.tsx index 9b73bc6352..01e4b74749 100644 --- a/packages/react-params/src/Param/KeyValue.tsx +++ b/packages/react-params/src/Param/KeyValue.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Props } from '../types'; +import type { Props } from '../types'; import React, { useCallback, useEffect, useState } from 'react'; import { Input } from '@polkadot/react-components'; diff --git a/packages/react-params/src/Param/KeyValueArray.tsx b/packages/react-params/src/Param/KeyValueArray.tsx index 85a972e78a..9eab3cf03a 100644 --- a/packages/react-params/src/Param/KeyValueArray.tsx +++ b/packages/react-params/src/Param/KeyValueArray.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeyValue as Pair } from '@polkadot/types/interfaces'; -import { Props, RawParam } from '../types'; +import type { Vec } from '@polkadot/types'; +import type { KeyValue as Pair } from '@polkadot/types/interfaces'; +import type { Props, RawParam } from '../types'; import React, { useCallback, useState } from 'react'; -import { Vec } from '@polkadot/types'; import { assert, isHex, u8aToHex, u8aToString } from '@polkadot/util'; import { useTranslation } from '../translate'; diff --git a/packages/react-params/src/Param/Moment.tsx b/packages/react-params/src/Param/Moment.tsx index fc582e6979..766c836d59 100644 --- a/packages/react-params/src/Param/Moment.tsx +++ b/packages/react-params/src/Param/Moment.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Props, RawParamOnChangeValue } from '../types'; +import type { Props, RawParamOnChangeValue } from '../types'; import React, { useCallback } from 'react'; import { Static } from '@polkadot/react-components'; diff --git a/packages/react-params/src/Param/Null.tsx b/packages/react-params/src/Param/Null.tsx index d4176fdda7..c9d868307e 100644 --- a/packages/react-params/src/Param/Null.tsx +++ b/packages/react-params/src/Param/Null.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Props } from '../types'; +import type { Props } from '../types'; import React, { useEffect } from 'react'; diff --git a/packages/react-params/src/Param/OpaqueCall.tsx b/packages/react-params/src/Param/OpaqueCall.tsx index 6188495893..dc1f242211 100644 --- a/packages/react-params/src/Param/OpaqueCall.tsx +++ b/packages/react-params/src/Param/OpaqueCall.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Props } from '../types'; +import type { Props } from '../types'; +import type { Bytes } from '@polkadot/types'; import React from 'react'; -import { Bytes } from '@polkadot/types'; import CallDisplay from './Call'; import Unknown from './Unknown'; diff --git a/packages/react-params/src/Param/Option.tsx b/packages/react-params/src/Param/Option.tsx index d70c1883c0..e4b84fb057 100644 --- a/packages/react-params/src/Param/Option.tsx +++ b/packages/react-params/src/Param/Option.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { TypeDef } from '@polkadot/types/types'; -import { Props } from '../types'; +import type { TypeDef } from '@polkadot/types/types'; +import type { Props } from '../types'; import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-params/src/Param/Raw.tsx b/packages/react-params/src/Param/Raw.tsx index 3d121f6b96..48e889f428 100644 --- a/packages/react-params/src/Param/Raw.tsx +++ b/packages/react-params/src/Param/Raw.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Codec } from '@polkadot/types/types'; -import { Props } from '../types'; +import type { Codec } from '@polkadot/types/types'; +import type { Props } from '../types'; import React, { useCallback, useState } from 'react'; import { Input } from '@polkadot/react-components'; diff --git a/packages/react-params/src/Param/Static.tsx b/packages/react-params/src/Param/Static.tsx index 234ec3a406..667ea7a299 100644 --- a/packages/react-params/src/Param/Static.tsx +++ b/packages/react-params/src/Param/Static.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Codec } from '@polkadot/types/types'; -import { RawParam } from '../types'; +import type { Codec } from '@polkadot/types/types'; +import type { RawParam } from '../types'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-params/src/Param/Struct.tsx b/packages/react-params/src/Param/Struct.tsx index 4ccccb2a35..69fe802d0e 100644 --- a/packages/react-params/src/Param/Struct.tsx +++ b/packages/react-params/src/Param/Struct.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Props, RawParam } from '../types'; +import type { Props, RawParam } from '../types'; import React, { useCallback } from 'react'; diff --git a/packages/react-params/src/Param/Text.tsx b/packages/react-params/src/Param/Text.tsx index fd81ea914f..e31577d228 100644 --- a/packages/react-params/src/Param/Text.tsx +++ b/packages/react-params/src/Param/Text.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Props } from '../types'; +import type { Props } from '../types'; import React, { useCallback, useState } from 'react'; import { Input } from '@polkadot/react-components'; diff --git a/packages/react-params/src/Param/Tuple.tsx b/packages/react-params/src/Param/Tuple.tsx index 648d77b5a6..ccc869a08f 100644 --- a/packages/react-params/src/Param/Tuple.tsx +++ b/packages/react-params/src/Param/Tuple.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Props, RawParam } from '../types'; +import type { Props, RawParam } from '../types'; import React, { useCallback } from 'react'; diff --git a/packages/react-params/src/Param/Unknown.tsx b/packages/react-params/src/Param/Unknown.tsx index 3846e81c2b..ae0e6c9b6d 100644 --- a/packages/react-params/src/Param/Unknown.tsx +++ b/packages/react-params/src/Param/Unknown.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Props } from '../types'; +import type { Props } from '../types'; import React from 'react'; diff --git a/packages/react-params/src/Param/Vector.tsx b/packages/react-params/src/Param/Vector.tsx index 808e9a9db6..cfec9e100e 100644 --- a/packages/react-params/src/Param/Vector.tsx +++ b/packages/react-params/src/Param/Vector.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ParamDef, Props, RawParam } from '../types'; +import type { ParamDef, Props, RawParam } from '../types'; import React, { useCallback, useEffect, useState } from 'react'; import { Button } from '@polkadot/react-components'; diff --git a/packages/react-params/src/Param/VectorFixed.tsx b/packages/react-params/src/Param/VectorFixed.tsx index 57e0cd27e1..71199da2af 100644 --- a/packages/react-params/src/Param/VectorFixed.tsx +++ b/packages/react-params/src/Param/VectorFixed.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ParamDef, Props, RawParam } from '../types'; +import type { ParamDef, Props, RawParam } from '../types'; import React, { useEffect, useState } from 'react'; import { isUndefined } from '@polkadot/util'; diff --git a/packages/react-params/src/Param/Vote.tsx b/packages/react-params/src/Param/Vote.tsx index 677577cc2c..7b9b1764aa 100644 --- a/packages/react-params/src/Param/Vote.tsx +++ b/packages/react-params/src/Param/Vote.tsx @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Props } from '../types'; +import type { Props } from '../types'; import BN from 'bn.js'; import React, { useRef } from 'react'; -import { GenericVote } from '@polkadot/types'; import { Dropdown } from '@polkadot/react-components'; +import { GenericVote } from '@polkadot/types'; import { useTranslation } from '../translate'; import Bare from './Bare'; diff --git a/packages/react-params/src/Param/VoteThreshold.tsx b/packages/react-params/src/Param/VoteThreshold.tsx index 80902147db..6745ef679e 100644 --- a/packages/react-params/src/Param/VoteThreshold.tsx +++ b/packages/react-params/src/Param/VoteThreshold.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Props } from '../types'; +import type { Props } from '../types'; import React, { useCallback } from 'react'; import { Dropdown } from '@polkadot/react-components'; diff --git a/packages/react-params/src/Param/findComponent.ts b/packages/react-params/src/Param/findComponent.ts index 9cff435212..8f0d4e3904 100644 --- a/packages/react-params/src/Param/findComponent.ts +++ b/packages/react-params/src/Param/findComponent.ts @@ -1,10 +1,11 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Registry, TypeDef, TypeDefInfo } from '@polkadot/types/types'; -import { Props, ComponentMap } from '../types'; +import type { Registry, TypeDef } from '@polkadot/types/types'; +import type { Props, ComponentMap } from '../types'; -import { getTypeDef } from '@polkadot/types/create'; +import { getTypeDef } from '@polkadot/types'; +import { TypeDefInfo } from '@polkadot/types/types'; import { isBn } from '@polkadot/util'; import Account from './Account'; diff --git a/packages/react-params/src/Param/index.tsx b/packages/react-params/src/Param/index.tsx index 02b45e33a0..b3d2c47a26 100644 --- a/packages/react-params/src/Param/index.tsx +++ b/packages/react-params/src/Param/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Props, Props as CProps } from '../types'; +import type { Props, Props as CProps } from '../types'; import React, { useMemo, useRef } from 'react'; import { classes } from '@polkadot/react-components/util'; diff --git a/packages/react-params/src/Param/useParamDefs.ts b/packages/react-params/src/Param/useParamDefs.ts index 75b0f311ba..c21f05177c 100644 --- a/packages/react-params/src/Param/useParamDefs.ts +++ b/packages/react-params/src/Param/useParamDefs.ts @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Registry, TypeDef } from '@polkadot/types/types'; -import { ParamDef } from '../types'; +import type { Registry, TypeDef } from '@polkadot/types/types'; +import type { ParamDef } from '../types'; import { useEffect, useState } from 'react'; import { getTypeDef } from '@polkadot/types/create'; diff --git a/packages/react-params/src/ParamComp.tsx b/packages/react-params/src/ParamComp.tsx index 3dc316fbd3..73aafee2d9 100644 --- a/packages/react-params/src/ParamComp.tsx +++ b/packages/react-params/src/ParamComp.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Registry, TypeDef } from '@polkadot/types/types'; -import { ComponentMap, RawParam, RawParams, RawParamOnChangeValue } from './types'; +import type { Registry, TypeDef } from '@polkadot/types/types'; +import type { ComponentMap, RawParam, RawParams, RawParamOnChangeValue } from './types'; import React, { useCallback } from 'react'; diff --git a/packages/react-params/src/index.tsx b/packages/react-params/src/index.tsx index 4f3104a51f..a825bca5d0 100644 --- a/packages/react-params/src/index.tsx +++ b/packages/react-params/src/index.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Registry } from '@polkadot/types/types'; -import { I18nProps } from '@polkadot/react-components/types'; -import { ComponentMap, ParamDef, RawParam, RawParams, RawParamOnChangeValue } from './types'; +import type { Registry } from '@polkadot/types/types'; +import type { I18nProps } from '@polkadot/react-components/types'; +import type { ComponentMap, ParamDef, RawParam, RawParams, RawParamOnChangeValue } from './types'; import React from 'react'; import { registry as defaultRegistry } from '@polkadot/react-api'; diff --git a/packages/react-params/src/initValue.ts b/packages/react-params/src/initValue.ts index 7f1fdeae5f..384becb7ec 100644 --- a/packages/react-params/src/initValue.ts +++ b/packages/react-params/src/initValue.ts @@ -1,10 +1,10 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Registry, TypeDef, TypeDefInfo } from '@polkadot/types/types'; +import type { Registry, TypeDef } from '@polkadot/types/types'; -import { Raw } from '@polkadot/types'; -import { getTypeDef } from '@polkadot/types/create'; +import { getTypeDef } from '@polkadot/types'; +import { TypeDefInfo } from '@polkadot/types/types'; import { BN_ZERO, isBn } from '@polkadot/util'; const warnList: string[] = []; @@ -113,7 +113,7 @@ export default function getInitValue (registry: Registry, def: TypeDef): unknown return undefined; case 'Extrinsic': - return new Raw(registry); + return registry.createType('Raw'); case 'Null': return null; diff --git a/packages/react-params/src/types.ts b/packages/react-params/src/types.ts index 62ef0f53d3..31521a7346 100644 --- a/packages/react-params/src/types.ts +++ b/packages/react-params/src/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Registry, TypeDef } from '@polkadot/types/types'; +import type { Registry, TypeDef } from '@polkadot/types/types'; // FIXME Ideally, we want these as Base from api-codec - as a stop-gap, any this until we have // params returning types extending Base (i.e. anything from api-codec) diff --git a/packages/react-params/src/valueToText.tsx b/packages/react-params/src/valueToText.tsx index d907a7c1cb..ff5e93feb5 100644 --- a/packages/react-params/src/valueToText.tsx +++ b/packages/react-params/src/valueToText.tsx @@ -1,13 +1,13 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Keys, ValidatorId } from '@polkadot/types/interfaces'; -import { Codec } from '@polkadot/types/types'; +import type { Keys, ValidatorId } from '@polkadot/types/interfaces'; +import type { Codec } from '@polkadot/types/types'; import React from 'react'; import { classes } from '@polkadot/react-components/util'; -import { isFunction, isNull, isUndefined, u8aToHex } from '@polkadot/util'; import { Option, Raw } from '@polkadot/types'; +import { isFunction, isNull, isUndefined, u8aToHex } from '@polkadot/util'; interface DivProps { className?: string; diff --git a/packages/react-params/src/values.ts b/packages/react-params/src/values.ts index 3f7c5e8fdf..a35e3009dd 100644 --- a/packages/react-params/src/values.ts +++ b/packages/react-params/src/values.ts @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Registry, TypeDef } from '@polkadot/types/types'; -import { RawParam } from './types'; +import type { Registry, TypeDef } from '@polkadot/types/types'; +import type { RawParam } from './types'; import { isUndefined } from '@polkadot/util'; diff --git a/packages/react-query/src/Available.tsx b/packages/react-query/src/Available.tsx index 4aadb6d0e2..562cfe156f 100644 --- a/packages/react-query/src/Available.tsx +++ b/packages/react-query/src/Available.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveBalancesAll } from '@polkadot/api-derive/types'; -import { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; +import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; +import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; import React from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/react-query/src/Balance.tsx b/packages/react-query/src/Balance.tsx index 832c675c4a..9512a2ebe4 100644 --- a/packages/react-query/src/Balance.tsx +++ b/packages/react-query/src/Balance.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveBalancesAll } from '@polkadot/api-derive/types'; -import { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; +import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; +import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; import React from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/react-query/src/BalanceFree.tsx b/packages/react-query/src/BalanceFree.tsx index edb8548ae7..0213b7de5f 100644 --- a/packages/react-query/src/BalanceFree.tsx +++ b/packages/react-query/src/BalanceFree.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveBalancesAll } from '@polkadot/api-derive/types'; -import { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; +import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; +import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; import React from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/react-query/src/BalanceVoting.tsx b/packages/react-query/src/BalanceVoting.tsx index 3dc4582418..b162d33dd2 100644 --- a/packages/react-query/src/BalanceVoting.tsx +++ b/packages/react-query/src/BalanceVoting.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveBalancesAll } from '@polkadot/api-derive/types'; -import { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; +import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; +import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; import React from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/react-query/src/Bonded.tsx b/packages/react-query/src/Bonded.tsx index d07eb87e17..49ce96731e 100644 --- a/packages/react-query/src/Bonded.tsx +++ b/packages/react-query/src/Bonded.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2020 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, AccountIndex, Address, StakingLedger } from '@polkadot/types/interfaces'; +import type { Option } from '@polkadot/types'; +import type { AccountId, AccountIndex, Address, StakingLedger } from '@polkadot/types/interfaces'; import React from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { Option } from '@polkadot/types'; import FormatBalance from './FormatBalance'; diff --git a/packages/react-query/src/Events.tsx b/packages/react-query/src/Events.tsx index a4721cf706..60a57b59f2 100644 --- a/packages/react-query/src/Events.tsx +++ b/packages/react-query/src/Events.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { IndexedEvent, KeyedEvent } from './types'; +import type { IndexedEvent, KeyedEvent } from './types'; import React, { useEffect, useState } from 'react'; import { useApi } from '@polkadot/react-hooks'; diff --git a/packages/react-query/src/FormatBalance.tsx b/packages/react-query/src/FormatBalance.tsx index 9e78f4f0bd..a029ba58f3 100644 --- a/packages/react-query/src/FormatBalance.tsx +++ b/packages/react-query/src/FormatBalance.tsx @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ThemeProps } from '@polkadot/react-components/types'; +import type { ThemeProps } from '@polkadot/react-components/types'; +import type { Compact } from '@polkadot/types'; import BN from 'bn.js'; import React from 'react'; import styled from 'styled-components'; -import { Compact } from '@polkadot/types'; import { formatBalance } from '@polkadot/util'; import { useTranslation } from './translate'; diff --git a/packages/react-query/src/LockedVote.tsx b/packages/react-query/src/LockedVote.tsx index de9d010486..2a0d9d7377 100644 --- a/packages/react-query/src/LockedVote.tsx +++ b/packages/react-query/src/LockedVote.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveCouncilVote } from '@polkadot/api-derive/types'; -import { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; +import type { DeriveCouncilVote } from '@polkadot/api-derive/types'; +import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; import React from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/react-query/src/Nonce.tsx b/packages/react-query/src/Nonce.tsx index b62ffc64ff..f35159e741 100644 --- a/packages/react-query/src/Nonce.tsx +++ b/packages/react-query/src/Nonce.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveBalancesAll } from '@polkadot/api-derive/types'; +import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; import BN from 'bn.js'; import React from 'react'; diff --git a/packages/react-signer/src/Address.tsx b/packages/react-signer/src/Address.tsx index 1866765b9c..95a041eca5 100644 --- a/packages/react-signer/src/Address.tsx +++ b/packages/react-signer/src/Address.tsx @@ -1,17 +1,17 @@ // Copyright 2017-2020 @polkadot/react-signer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; -import { QueueTx } from '@polkadot/react-components/Status/types'; -import { AccountId, BalanceOf, Call, Multisig, ProxyDefinition, ProxyType } from '@polkadot/types/interfaces'; -import { ITuple } from '@polkadot/types/types'; -import { AddressFlags, AddressProxy } from './types'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { QueueTx } from '@polkadot/react-components/Status/types'; +import type { Option, Vec } from '@polkadot/types'; +import type { AccountId, BalanceOf, Call, Multisig, ProxyDefinition, ProxyType } from '@polkadot/types/interfaces'; +import type { ITuple } from '@polkadot/types/types'; +import type { AddressFlags, AddressProxy } from './types'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { ApiPromise } from '@polkadot/api'; import { InputAddress, Modal, Toggle } from '@polkadot/react-components'; import { useAccounts, useApi, useIsMountedRef } from '@polkadot/react-hooks'; -import { Option, Vec } from '@polkadot/types'; import { isFunction } from '@polkadot/util'; import { useTranslation } from './translate'; diff --git a/packages/react-signer/src/Password.tsx b/packages/react-signer/src/Password.tsx index e13cdf698a..f9b15ea5de 100644 --- a/packages/react-signer/src/Password.tsx +++ b/packages/react-signer/src/Password.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-signer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeyringPair } from '@polkadot/keyring/types'; +import type { KeyringPair } from '@polkadot/keyring/types'; import React, { useEffect, useMemo, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-signer/src/PaymentInfo.tsx b/packages/react-signer/src/PaymentInfo.tsx index 3c988f789e..3627fd11c6 100644 --- a/packages/react-signer/src/PaymentInfo.tsx +++ b/packages/react-signer/src/PaymentInfo.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-signer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/promise/types'; -import { RuntimeDispatchInfo } from '@polkadot/types/interfaces'; +import type { SubmittableExtrinsic } from '@polkadot/api/promise/types'; +import type { RuntimeDispatchInfo } from '@polkadot/types/interfaces'; import BN from 'bn.js'; import React, { useState, useEffect } from 'react'; diff --git a/packages/react-signer/src/SignFields.tsx b/packages/react-signer/src/SignFields.tsx index 935a900e36..b4845f2b06 100644 --- a/packages/react-signer/src/SignFields.tsx +++ b/packages/react-signer/src/SignFields.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-signer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SignerOptions } from '@polkadot/api/submittable/types'; +import type { SignerOptions } from '@polkadot/api/submittable/types'; import BN from 'bn.js'; import React, { useCallback, useEffect, useState } from 'react'; diff --git a/packages/react-signer/src/Transaction.tsx b/packages/react-signer/src/Transaction.tsx index 87071aa106..f62afc3c77 100644 --- a/packages/react-signer/src/Transaction.tsx +++ b/packages/react-signer/src/Transaction.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-signer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { QueueTx } from '@polkadot/react-components/Status/types'; +import type { QueueTx } from '@polkadot/react-components/Status/types'; import BN from 'bn.js'; import React from 'react'; diff --git a/packages/react-signer/src/TxSigned.tsx b/packages/react-signer/src/TxSigned.tsx index 805e68efe1..5e801faa37 100644 --- a/packages/react-signer/src/TxSigned.tsx +++ b/packages/react-signer/src/TxSigned.tsx @@ -1,12 +1,13 @@ // Copyright 2017-2020 @polkadot/react-signer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; -import { SignerOptions } from '@polkadot/api/submittable/types'; -import { KeyringPair } from '@polkadot/keyring/types'; -import { QueueTx, QueueTxMessageSetStatus } from '@polkadot/react-components/Status/types'; -import { Multisig, Timepoint } from '@polkadot/types/interfaces'; -import { AddressProxy, QrState } from './types'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { SignerOptions } from '@polkadot/api/submittable/types'; +import type { KeyringPair } from '@polkadot/keyring/types'; +import type { QueueTx, QueueTxMessageSetStatus } from '@polkadot/react-components/Status/types'; +import type { Option } from '@polkadot/types'; +import type { Multisig, Timepoint } from '@polkadot/types/interfaces'; +import type { AddressProxy, QrState } from './types'; import React, { useCallback, useContext, useEffect, useState } from 'react'; import styled from 'styled-components'; @@ -15,7 +16,6 @@ import { web3FromSource } from '@polkadot/extension-dapp'; import { registry } from '@polkadot/react-api'; import { Button, ErrorBoundary, Modal, Output, StatusContext, Toggle } from '@polkadot/react-components'; import { useApi, useToggle } from '@polkadot/react-hooks'; -import { Option } from '@polkadot/types'; import keyring from '@polkadot/ui-keyring'; import { BN_ZERO, assert } from '@polkadot/util'; diff --git a/packages/react-signer/src/TxUnsigned.tsx b/packages/react-signer/src/TxUnsigned.tsx index 8bdf5dbf66..c71ef442f2 100644 --- a/packages/react-signer/src/TxUnsigned.tsx +++ b/packages/react-signer/src/TxUnsigned.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-signer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; -import { QueueTx, QueueTxMessageSetStatus } from '@polkadot/react-components/Status/types'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { QueueTx, QueueTxMessageSetStatus } from '@polkadot/react-components/Status/types'; import React, { useCallback, useContext } from 'react'; import { Button, ErrorBoundary, Modal, StatusContext } from '@polkadot/react-components'; diff --git a/packages/react-signer/src/index.tsx b/packages/react-signer/src/index.tsx index 6193504930..6347bb4170 100644 --- a/packages/react-signer/src/index.tsx +++ b/packages/react-signer/src/index.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/react-signer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { QueueTx, QueueTxMessageSetStatus, QueueTxResult } from '@polkadot/react-components/Status/types'; -import { BareProps as Props } from '@polkadot/react-components/types'; -import { DefinitionRpcExt } from '@polkadot/types/types'; +import type { QueueTx, QueueTxMessageSetStatus, QueueTxResult } from '@polkadot/react-components/Status/types'; +import type { BareProps as Props } from '@polkadot/react-components/types'; +import type { DefinitionRpcExt } from '@polkadot/types/types'; import React, { useContext, useMemo } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-signer/src/signers/AccountSigner.ts b/packages/react-signer/src/signers/AccountSigner.ts index 64d50a1543..3beecd5d24 100644 --- a/packages/react-signer/src/signers/AccountSigner.ts +++ b/packages/react-signer/src/signers/AccountSigner.ts @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/react-signer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Signer, SignerResult } from '@polkadot/api/types'; -import { KeyringPair } from '@polkadot/keyring/types'; -import { SignerPayloadJSON } from '@polkadot/types/types'; +import type { Signer, SignerResult } from '@polkadot/api/types'; +import type { KeyringPair } from '@polkadot/keyring/types'; +import type { SignerPayloadJSON } from '@polkadot/types/types'; import { registry } from '@polkadot/react-api'; diff --git a/packages/react-signer/src/signers/ApiSigner.ts b/packages/react-signer/src/signers/ApiSigner.ts index 4bec728ba8..46b034b01f 100644 --- a/packages/react-signer/src/signers/ApiSigner.ts +++ b/packages/react-signer/src/signers/ApiSigner.ts @@ -1,11 +1,11 @@ // Copyright 2017-2020 @polkadot/react-signer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Signer, SignerResult } from '@polkadot/api/types'; -import { SubmittableResult } from '@polkadot/api'; -import { QueueTxPayloadAdd, QueueTxMessageSetStatus, QueueTxStatus } from '@polkadot/react-components/Status/types'; -import { Hash } from '@polkadot/types/interfaces'; -import { SignerPayloadJSON } from '@polkadot/types/types'; +import type { Signer, SignerResult } from '@polkadot/api/types'; +import type { SubmittableResult } from '@polkadot/api'; +import type { QueueTxPayloadAdd, QueueTxMessageSetStatus, QueueTxStatus } from '@polkadot/react-components/Status/types'; +import type { Hash } from '@polkadot/types/interfaces'; +import type { SignerPayloadJSON } from '@polkadot/types/types'; import { registry } from '@polkadot/react-api'; import { ClassOf } from '@polkadot/types/create'; diff --git a/packages/react-signer/src/signers/LedgerSigner.ts b/packages/react-signer/src/signers/LedgerSigner.ts index 07716c1fe8..ad791eba08 100644 --- a/packages/react-signer/src/signers/LedgerSigner.ts +++ b/packages/react-signer/src/signers/LedgerSigner.ts @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/react-signer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Signer, SignerResult } from '@polkadot/api/types'; -import { SignerPayloadJSON } from '@polkadot/types/types'; +import type { Signer, SignerResult } from '@polkadot/api/types'; +import type { SignerPayloadJSON } from '@polkadot/types/types'; import { getLedger, registry } from '@polkadot/react-api'; diff --git a/packages/react-signer/src/signers/QrSigner.ts b/packages/react-signer/src/signers/QrSigner.ts index d08e4fd34f..b3cff3ed10 100644 --- a/packages/react-signer/src/signers/QrSigner.ts +++ b/packages/react-signer/src/signers/QrSigner.ts @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/react-signer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Signer, SignerResult } from '@polkadot/api/types'; -import { SignerPayloadJSON } from '@polkadot/types/types'; -import { QrState } from '../types'; +import type { Signer, SignerResult } from '@polkadot/api/types'; +import type { SignerPayloadJSON } from '@polkadot/types/types'; +import type { QrState } from '../types'; import { registry } from '@polkadot/react-api'; import { blake2AsU8a } from '@polkadot/util-crypto'; diff --git a/packages/react-signer/src/types.ts b/packages/react-signer/src/types.ts index 1283e59d59..629f9352a7 100644 --- a/packages/react-signer/src/types.ts +++ b/packages/react-signer/src/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-signer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SignerResult } from '@polkadot/api/types'; +import type { SignerResult } from '@polkadot/api/types'; export interface AddressFlags { hardwareType?: string; diff --git a/packages/react-signer/src/util.ts b/packages/react-signer/src/util.ts index fc06163670..a6a5bdf0e3 100644 --- a/packages/react-signer/src/util.ts +++ b/packages/react-signer/src/util.ts @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/react-signer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { KeyringPair } from '@polkadot/keyring/types'; -import { QueueTx, QueueTxMessageSetStatus, QueueTxStatus } from '@polkadot/react-components/Status/types'; -import { AddressFlags } from './types'; +import type { KeyringPair } from '@polkadot/keyring/types'; +import type { QueueTx, QueueTxMessageSetStatus, QueueTxStatus } from '@polkadot/react-components/Status/types'; +import type { AddressFlags } from './types'; import { SubmittableResult } from '@polkadot/api'; import keyring from '@polkadot/ui-keyring';