diff --git a/packages/apps-config/src/api/bundle/spec/acala.ts b/packages/apps-config/src/api/bundle/spec/acala.ts index 26cfaf6956b..8145d31c10b 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 d20b6e01cab..33e4722f328 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 4210d42c99e..c4f60ec17a7 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 cfb5d0476e1..94e1ca6f5d0 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 cd852d84641..7e7f169aa33 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 1b019832289..66b93be6d79 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 388ffaa9f9a..73b8215bff0 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 2ec64156795..fc0ea92bae1 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 aae3d090b0d..d82e1045315 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 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 { KeyringJson } from '@polkadot/ui-keyring/types'; import { IpcMainHandler } from './ipc-main-handler'; -import * as tmp from 'tmp'; 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 3169ec686f7..3c115bd1848 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 d8c108e8a7c..df48975c916 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 4de3e4f3d5c..859b29f1a3b 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 79c982f3216..ca5c2b6cb20 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 d74675691e4..2170db32535 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 d6fb2eedbbb..f374f6e1efe 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 bed7f4123f5..2b69bf6e403 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 863312b9869..09b8d23652a 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 3d1ede61fa9..ac70cf9d7c4 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 c0bc9c77aa9..8e1c35936e7 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 1691813bfa9..656364ef22d 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 3e53979a6a7..e740f179623 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 1478ccec849..f32fc216704 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 c214491fd13..bd030bbdb89 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 63394821d9d..bc9447a674d 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 5adcdf1ed55..6811dd22d0c 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 8358c76551e..cdce254f32c 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 c58f1d8fd1d..89d4f9721e7 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 4a8503a9785..44b0a7874df 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 db97cd36170..9fe11626050 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 404e2110c00..53e2420ad8b 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 fc690b4bbdc..5c945f42f19 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 aaa2766212d..dfac0cd6e92 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 33224817f57..10f795269fe 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 6f2bbab5eaf..03ff3fee2f5 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 5b85a8c207f..947c93386ff 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 718956bfb62..454031dadfb 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 781c04d7aa3..cb56434a545 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 85c0614a904..1a3d75f697c 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 a912562fcf3..d71c19fa770 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 1a7ea30a103..9fed67c9c07 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 bf4410b3226..c8dbc758695 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 139ba1e29e8..9b8215a9460 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 85b1d9b3406..14ba8daf278 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 5f7f36050c2..f9161a878e4 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 50148cfab29..eae2df013e8 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 5c6c43c34a5..2f6b864dab4 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 edad74dafc8..c2c8ed49aa4 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 9b0ed5f1986..5a90fe81b99 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 8494a379c39..7bed75e1db7 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 3d7448f5766..6b6af836fe5 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 dd24f6c8fe5..72f4d2cb9a9 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 f8637532322..318e2c0f01b 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 d9d8a066829..d6c9d77003f 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 b0de88a4719..430ab4aab55 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 b5d7c0b2aea..93b80710339 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 86ec28411eb..bcb4572321a 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 ae2ce60e602..ef7a2216997 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 6259e583f6e..ed4eb3faff7 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 55f314e7b88..4f5c59fd21b 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 778e2c7a92d..5cb445088a1 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 6c91d348aad..bf80905e853 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 fc614ee8ab7..7e89a0c5746 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 a754455e88a..5389793425a 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 625068349e0..6622181a4c9 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 76ff8172b0d..c5869a41c24 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 6eeba779044..7931e2d8a9b 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 4e2a4d9ff64..9cd47cc8766 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 26f90796f2b..80ebb3779b9 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 ceaa198dbf4..2ed74cbdae0 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 c9d32891c90..def103e89d6 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 0356193fe01..994b331bbb9 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 86516d00a6f..39ef11638b0 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 d68800882dd..d3e7bb81dbd 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 f4f8f9f4453..2cfd4e346b7 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 ba9b2742271..440e6691853 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 4715d13b483..fec8d9c361a 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 fa246e48743..32828ffb95f 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 ae71f25370b..970c1bd3c71 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 6652b269355..0c0d624025c 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 b0907f8ce53..423bedd7a6e 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 1d5674c08bd..8548f38ab45 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 3ca2cc2b2d1..9090126b362 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 6ebfc93090c..1f08bcde1a1 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 a8acf39ddfe..817a85185b9 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 8ef77ba8887..ca18d4e8f5e 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 f145b16f28c..0f80774e962 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 dbdb3814c46..55daa4d13d2 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 5580aa3f1f2..f6893ed05cd 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 d6ac4430f43..489bb85dd39 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 ca57e9d5ed6..aeb197fb768 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 4af5e0b2a0f..99ad8a84bae 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 cc24a458409..21bed4f4761 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 3a609ff2e58..e15488596d9 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 8f99553b894..7ba08f8d713 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 3c1953a5255..f1f54f531a3 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 e395e150298..b582c055a12 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 58a895768ca..fb90ec23c5d 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 6dd09e037e0..75b2dec6a30 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 f88e6666cdb..67a3b5c780c 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 668ff93867a..c7745a8d47c 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 4e2f1897206..a365dae5134 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 25d9c097626..d8ae16177da 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 5839a162b7e..ef3d0cc1579 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 a37b0767fde..5eb5424d190 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 841572e71d3..ba7412bb978 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 12486d7e241..dd67e5bac9d 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 d0a7446ad6f..694f9315218 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 912931061b1..89ea358b550 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 d8218c87e02..669cad246fc 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 8d7d5c8fad7..87cf9ae4131 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 cea93f8a1a0..f405e96fd19 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 b20a55c72c8..803dc69166b 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 3a3cbe99887..44234b2fd1e 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 2083b3db621..ef658d91816 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 3aa5dcee7a4..b6382add0ca 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 b8dd019470b..f39de76842b 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 98cd405aaee..c6e761b5959 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 1365537e086..16b0795e4d9 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 bbe5f621ac1..707941097e3 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 b8b17f76aad..0fbf96b5eda 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 616b791e546..9dde6c4f092 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 d29be7d5dc6..fa0db9654f9 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 c3ed746d440..bb7b12a8d6a 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 342ac638ac3..4ce472291ac 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 c7393db8952..da3c5836430 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 c74ba6e710f..fdb837bdf86 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 4b991452644..e6e41b9c1c3 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 716e15bc857..fe7dbe8a8ea 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 1ee8006db7a..e25121f4293 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 9bf565d6885..25192773d5b 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 ee041a2ff5c..edc61a9abc4 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 7802412c099..3fe39501292 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 1d2c6891b48..4324bea7d3f 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 81e2881bb67..9b9851cfa7b 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 703c025bdef..3a07138b4cf 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 584c66db309..4528830d26b 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 6ec88be4a35..df6e20c5f29 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 82c9c123e94..4c6a32999af 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 ca2619ebd36..29ec7dd0b4a 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 4c8ca31edbe..66f3e3cd53b 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 6eeb815dd6a..032058f782e 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 81bfed5a413..5b7aca10a4c 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 9ee0899b08a..8bb0cccc54e 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 165089abb77..7bc8f7be3fd 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 ca66d9d6835..febb05eb18d 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 178c8bed7a3..d2f6654eac7 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 96499210856..0ee383c011a 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 219c0435b16..f6afba52743 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 fbd875a61b0..bbdc6636b70 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 c0bb1f01405..0fd7e3c561d 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 1d51735f2ab..9c4fbe4780e 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 89d30b00e60..d7f05a1c195 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 2be64e85d28..cbb0da7087d 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 3038874aa19..9ec93cf931a 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 063f994c757..65871fa1e27 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 b3b9543edd8..be34aa0191c 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 e1ba36f6b4f..0d310dfab8e 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 86885ca1632..1721d9a2e67 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 375999275dd..b2bb0d1a541 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 c1c8eefe27e..7be272b4090 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 684efcd2624..28cdd974877 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 af61f4d7db4..6b7d28552ad 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 096aed5eda0..11e91c7c2f9 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 eb33ee54827..b7fb6ec90f7 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 650e70f0526..f3768b158c3 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 2987c028f5c..8551a6e5a52 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 f5ab83fbbd6..dbf68de8743 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 577cd15e5d7..72ea7ff2c89 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 e3238ba3e34..52ddf800aea 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 5dba5c43c30..52b9817fa09 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 eb38fc89256..b83d5550017 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 f7110789453..85409b13f64 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 670d1b1cc26..da128195ae0 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 a697201c9b2..bec6fe4faa9 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 3f99da5bf31..fcbee791145 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 429d5ff3e67..58640cf4ad5 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 7122c1d0beb..6658a904411 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 2307599d905..130b9d5cac2 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 733c6b2e89c..0d0b4777866 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 717f9515b65..0bba04c5733 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 008c259b549..ee30408adf3 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 43aab5366a0..f18083dbb3d 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 e512c345d63..e13c38f9b68 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 cbdc3dbf0a4..de608591d3c 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 9bb6476ec15..f63f001e163 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 a63a0cde87c..68c92cfbef7 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 108bc3aa5e6..f6783f16da7 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 f99e6fb8b7a..ba106404bdd 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 fbeb707fb46..09838cba5b1 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 06ee0c09a34..8b849a95518 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 dd2f4fe1f69..836d29bb895 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 a5dec0188bf..094c9079ca5 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 9b38ac36122..647dde40dc3 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 d505ee22f42..3654e77ead5 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 5c26116a018..1d5d1d287a2 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 f18399786aa..0fe143d39b4 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 26050c85e32..e30c95df935 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 dd5e5e05803..289d5f1b5b9 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 9e8f76e2524..12d474a304b 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 1bccf279178..297fe32aff0 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 f909ca50bc7..1151aee56ac 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 0615e2fe05c..bc25d855e75 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 ea024260fa7..8a71dcc89c9 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 176750190c1..0c83e30c67f 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 bb1c241cb4b..6c7cfb310ea 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 d8d859eadd9..d161b11db34 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 ef3e0aa9f24..682bfc1c669 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 af031517104..1fa4890ec2d 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 c78315582f2..3ffd5e07a0f 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 14288f43482..c458a4e9825 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 0e522b79019..944c374b9a6 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 8b4fff3b446..3aa78ea7b7e 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 d6bef4962ec..2bea9493055 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 0d1c98935db..c92d0421cde 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 e6ab8401fdf..18afca77006 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 0f35232f128..ed6443501a3 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 b3e4a762a56..09c7e08b97e 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 607cb2044a4..77b2a3d2b08 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 7c3b2070780..851d5cf6b82 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 8ee2fe5c36a..9ac6693fecb 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 e1eebbd2258..c24445808b1 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 c49a8f175e8..85efd849e4f 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 9355787f8e2..631ec001480 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 d7ace4346b3..50d87fc223c 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 458dfbd4319..4c8846a62b0 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 a969df0dcf4..90056094674 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 99f3e827fc4..a4f109fb6e7 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 f308460f8ea..748017bf9c3 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 971890f4ae5..d62d4c1504a 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 909001f5733..ed7266feda2 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 28b10f2401b..4591fb2028b 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 4889c2f22db..52e041da9fb 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 96d6f81ed17..840dc09ce40 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 5d6c0688706..3db6741657c 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 f0d831c1939..167b0cea165 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 a4697d71170..24f3f641b4f 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 b5f73e0d780..93589806155 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 a33e9817572..ffaf07b415f 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 0015b93dff7..a40c2d65eb5 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 a491892e95e..236ad395687 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 0525c0e7fc9..036346bd4e6 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 93d8d1c825e..4c035312d81 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 d8b61c22f28..52edd946b63 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 013858846f7..56b34958195 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 a0069d9df3f..f9f252f17d4 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 25dcbc02b68..d22c608ec7e 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 13a6af70dfa..dfb002077f4 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 0b152da957f..be9956a9e35 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 8687f108fda..69f14aefd96 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 4bd262ad816..a7443d1548f 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 45796597045..b8fcf907e3a 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 f5d60acac18..c28580844ca 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 fffd0a26ac5..9af371bac9d 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 1b80fbd0d26..884d259da61 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 b2a497e3cdf..40696ad4a3d 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 8d2f4cd7f52..e993b84c4f5 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 239a324d953..6726f4005a5 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 025b43969a7..abda3413042 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 ceccd4b3a15..8467615cb63 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 ceefb5cfec3..eda54b0b6bd 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 51e8a7270f8..171793fa1f7 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 a6f7a003e15..e7008df69be 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 b1fa01c03ea..7e6bf39f92d 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 670cbcf8471..67d383dd1f2 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 387f89958cc..84c8dcadf69 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 09ef9aea3e6..d51e7a04c79 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 b6cc7197264..9dd5336a40b 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 4ba3b4ab185..25c373c7c62 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 6fdfec218d9..aae5f7b76e0 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 1344fafbcf4..8af613e15fd 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 59bcdd7ed11..819f60218d2 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 b84c750df47..efd909dcf2e 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 16d9fcf59cb..36a16c19463 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 f6140da0b93..fe292540d07 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 58656218094..6a251d88899 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 a52667f3198..4470d6eadfe 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 52531e54de4..bb572a55501 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 c18bae0e31e..b50ac50498d 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 939481bd513..b0ae29c02f1 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 6882e291039..5db72c8724c 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 d1dd5a4b985..f4a214776c0 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 f550030ad48..4340274bbb3 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 9c2a21b58c6..2f2f53144a0 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 1b215bb586f..526abc6659a 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 0600ffddea9..5d7a51eb862 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 7409d97e7f1..e4dd3809beb 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 36c74d48fea..c49de64b557 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 f76680dbde5..2a87efb6cfe 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 360c05aaa64..75f466d37ab 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 fcef29adb62..e98157fef91 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 ce2996ff15b..241ceff12a8 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 c04417c5643..05fc6c3d7c0 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 a249557dc5c..d3c1450dc71 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 e8aa18e5727..d47bf4dcb9d 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 4284ab1e702..fa723d06b29 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 19a2555b1c9..eb8635c8b1e 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 06bf33f985e..e9a7683974c 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 aeb92466c59..38459d7e15b 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 048da4f5234..295ca66c87b 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 9c4290f01f2..091b83d63e9 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 277feabbe71..03b4c64d730 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 c14a27d307b..b4b38421532 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 26029d09a2b..7a599e818ad 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 07eb7ac4039..9e1fa921fa1 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 7ba7146bf6d..db09400c9ed 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 57adb89e6d3..3a3d57de420 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 91b3b00eb20..74221844869 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 b1e526a6cae..200d63ec7bd 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 2d1431d28fb..a75bf109266 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 b9170313eac..9e770a1c401 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 7a9ae28b31c..6d62f35d7a3 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 a6ea9ac4b5d..ad365a670b4 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 5a79f8319cd..1dd853dcf9f 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 6dbff0d098f..86f367daae0 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 02f476a97fc..483a674644e 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 5efde030e29..4bf8be8a739 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 7e777b84cf4..b6b6c41765c 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 e7b63c4033d..33d0a3607cf 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 69abbd03a97..4518bd3ac03 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 db8fe1cedfa..57f54400b30 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 11af9203632..9533c25fa3a 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 f1c74b65a4a..bb2f6ee90fd 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 f1403aebbb4..0449671d642 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 3bbd73fa2f0..d5379d0c6b2 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 792c0d0d575..73cbf4de9e9 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 2666b6d2964..70146ded63b 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 16f69f29e13..4cd2841bfb3 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 83302d8b3f2..e312e93e859 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 b60f992489b..184a7df312b 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 b3c444d2625..0978043e73a 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 04239a7b5b0..c0ccd735cd0 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 9b1e0784dca..f128e1773f5 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 4a513f985e0..d799a207f17 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 c56852accdc..e22a654c024 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 1eb96121d3b..8ed5ce40bec 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 de20d26b89a..e08d3c656e5 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 eaba33a4bed..f318b5dbbc6 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 acb0a39d45e..4d842a1692d 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 52489c07380..1ca4df107fe 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 acd0d9348be..fbab31dac8e 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 9ad6dc16f25..fb3f1e6994f 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 fc96e8e9a3c..87ca76543ad 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 36b8e08c560..b1179377506 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 0e4e0226dc5..a0480c71fa3 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 08b60c6cd8a..a8d109c1105 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 987a2a82845..8a3c0d9b9e5 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 c01875bf30f..c34dfe19b1b 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 8990258f6ff..9f49770ba57 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 e9c000b88cf..1eb7c62c426 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 12a3b338fe2..bc9662420e3 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 182f6ffc1e2..3d52ff1ac02 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 e58611c18fe..ea13e2073d5 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 a6d4df2706e..800a33e845e 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 e93a445fbea..2dfe767d266 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 787153e5539..6a69f9fb356 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 b7597cf920b..2e3bf95fea1 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 841ba5cbfb6..e2a0b2f997b 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 9b42715704c..aae51759e1f 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 de6ec710156..d1c7375080b 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 fe89f46e9a8..ef2a0ebd442 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 44fa6e2dba3..3d024c36888 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 5855db3f484..f28f655a76d 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 a0f28d607ff..81237651355 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 d8b533a5b59..975f86b0d00 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 47be537ff2e..d922e9b1190 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 72d0fa8916e..ba24e12d98e 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 752e057aab5..c6349cd50f3 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 8e15954f940..f644e0779b8 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 af185b2213c..338f43dfa53 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 71638b96bf7..42c99ac1914 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 c28870ae37a..d033af67863 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 548f7bf2117..092a63f81b8 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 48c89e8905d..abd9b533772 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 0e96294174d..fd953112572 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 521de61bf08..5d19f3fa030 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 4310fb2f3a3..e6d0ba208f7 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 402d144f3b9..6b40441bb01 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 89b2bb1af96..d869a858213 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 1742d5fd6db..cdcf39ad1d8 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 496aff2c2c5..63d5714efe3 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 b82b6dc6165..ce4943441d3 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 1181c3f074f..689d43bbf01 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 c5aa9c0f166..17b9acef87c 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 8b7c629a3fb..cfef8db7477 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 7ea943ad1cb..7c365a150eb 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 9405a847534..f5da1accf02 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 01983fc9979..82666b0b098 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 64f6c432b84..480e5e2addd 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 aaa592dc34c..ba920766a72 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 3c135455575..aa60bcf6c5d 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 ab4f951209a..93da72c5359 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 5aaf7ceb7b9..5bba1d24031 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 645dfa0aafa..2d12c7e7d98 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 c4cfd4128b4..eb77e07543c 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 009d95d47d7..0e05c8ca311 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 ca4cb55034c..55922284afb 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 affbd1d3982..049175a80aa 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 bb57971b9b6..3dc3edc372d 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 33c8235234c..2946b809888 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 2debed63da8..eb4eddef88c 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 1b03049bae7..eab28b52181 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 f29a0ba8b40..8739de43b22 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 c8c0412a307..8222a29cdba 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 b4a1952be8b..af0401df34d 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 ea20582e915..639997d6a1d 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 d54fafbe0e6..c3a0d84f53c 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 d1873fe78e2..2cf3e6958ee 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 e9bfbc81024..372e9a8f7c8 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 82836e9f3ac..80eccc7bf1d 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 b6a9343f8bb..f1c2c62e880 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 78844c50a9b..540b08345b9 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 3abcd0c6b07..9ceff10e82f 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 16ba99308d2..a4a4855eba8 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 4e95812345f..b3708cb9c4e 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 f9d456f4531..ef77718963f 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 2f2760ad7f2..f42afb9cca5 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 a2bcb16fadf..24434183fbc 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 d3a56b8016f..0691354d756 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 fe15e5a8a3b..d6d91cb3eff 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 028f6266ee5..367e0819446 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 db6503bc5f5..70bd19c6bc4 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 4e124f0dd6a..6d92d3b5eb3 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 a4b73085747..b2d96e13e99 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 fbcbe924c78..e23bab90ae3 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 b297819329c..93fbe43285e 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 a026b7b4c7c..49041087ebc 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 0474966d545..703b7515d70 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 ddc3a82e579..6c1011f78c3 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 897ba7b124f..ce3469a63bf 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 ff1533d8dca..b2b6f445d64 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 57035627a0f..eb863e598ed 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 9a84a8b97f7..e6f2309c6dc 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 deea88db562..e5b9a87981c 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 1c37b726603..c2dd816c719 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 394af45032e..8e7091076be 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 75992f90e99..08dc6dbf5f9 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 4d48143ef7f..f2f3bd69429 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 2b44abc04b9..a63dd80c0e2 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 6e9d8dd52cc..93cbf36a946 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 9b73bc6352c..01e4b74749e 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 85a972e78a2..9eab3cf03a7 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 fc582e69798..766c836d59b 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 d4176fdda78..c9d868307ef 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 61884958932..dc1f242211e 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 d70c1883c09..e4b84fb0572 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 3d121f6b965..48e889f428a 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 234ec3a4061..667ea7a2997 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 4ccccb2a355..69fe802d0e9 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 fd81ea914f3..e31577d2287 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 648d77b5a66..ccc869a08f8 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 3846e81c2b3..ae0e6c9b6dc 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 808e9a9db6e..cfec9e100e6 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 57e0cd27e19..71199da2aff 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 677577cc2c4..7b9b1764aaf 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 80902147dbd..6745ef679e4 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 9cff4352120..8f0d4e3904d 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 02b45e33a06..b3d2c47a26d 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 75b0f311ba0..c21f05177ca 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 3dc316fbd33..73aafee2d9a 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 4f3104a51f9..a825bca5d09 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 7f1fdeae5fb..384becb7ecb 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 62ef0f53d35..31521a73463 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 d907a7c1cb3..ff5e93feb50 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 3f7c5e8fdf4..a35e3009dd2 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 4aadb6d0e28..562cfe156f7 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 832c675c4a8..9512a2ebe4c 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 edb8548ae7b..0213b7de5fd 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 3dc4582418e..b162d33dd27 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 d07eb87e176..49ce96731eb 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 a4721cf7065..60a57b59f24 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 9e78f4f0bd1..a029ba58f3f 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 de9d010486b..2a0d9d73775 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 b62ffc64ff8..f35159e741c 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 1866765b9cf..95a041eca50 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 e13cdf698aa..f9b15ea5deb 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 3c988f789ed..3627fd11c6b 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 935a900e36b..b4845f2b060 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 87071aa1063..f62afc3c778 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 805e68efe10..5e801faa376 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 8bdf5dbf66c..c71ef442f2f 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 6193504930c..6347bb4170e 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 64d50a1543b..3beecd5d242 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 4bec728ba84..46b034b01ff 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 07716c1fe88..ad791eba08c 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 d08e4fd34f8..b3cff3ed10d 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 1283e59d59c..629f9352a7a 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 fc061636702..a6a5bdf0e32 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';