Use import type { ... } (#4052)

* Use import type { ... }

* value imports

* TypeDefInfo

* Apply suggestions from code review

* fixes... am going blind.
This commit is contained in:
Jaco Greeff 2020-11-19 16:20:14 +01:00 committed by GitHub
parent 79ed228fa7
commit a0b82d88a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
487 changed files with 892 additions and 878 deletions

View File

@ -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';

View File

@ -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';

View File

@ -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<string, Record<string, DefinitionRpc>> {
function generateDescription (description:string, returnType:string, params:DefinitionRpcParam[] = []):DefinitionRpc {

View File

@ -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';

View File

@ -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';

View File

@ -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 [

View File

@ -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';

View File

@ -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 }[]>

View File

@ -1,11 +1,13 @@
// Copyright 2017-2020 @polkadot/apps authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { FileStore } from '@polkadot/ui-keyring/stores';
import { accountStoreIpcHandler } from './account-store';
import { KeyringJson } from '@polkadot/ui-keyring/types';
import { IpcMainHandler } from './ipc-main-handler';
import type { KeyringJson } from '@polkadot/ui-keyring/types';
import * as tmp from 'tmp';
import { FileStore } from '@polkadot/ui-keyring/stores';
import { accountStoreIpcHandler } from './account-store';
import { IpcMainHandler } from './ipc-main-handler';
const exampleAccount = (address: string): KeyringJson => ({
address,

View File

@ -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';

View File

@ -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', {

View File

@ -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 {

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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);

View File

@ -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 {

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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<string, KeyringJson>;

View File

@ -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';

View File

@ -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);

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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);

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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 {

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

Some files were not shown because too many files have changed in this diff Show More