Move type-only imports (w/ verbatimModuleSyntax) (#1245)

This commit is contained in:
Jaco
2023-04-02 11:49:57 +03:00
committed by GitHub
parent f5a0912953
commit a5380d268f
32 changed files with 72 additions and 48 deletions
@@ -11,6 +11,7 @@ import type { KeyringPair } from '@polkadot/keyring/types';
import type { ExtDef } from '@polkadot/types/extrinsic/signedExtensions/types';
import type { SignerPayloadJSON } from '@polkadot/types/types';
import type { KeypairType } from '@polkadot/util-crypto/types';
import type { AuthUrls } from './State.js';
import { TypeRegistry } from '@polkadot/types';
import keyring from '@polkadot/ui-keyring';
@@ -18,7 +19,7 @@ import { cryptoWaitReady } from '@polkadot/util-crypto';
import { AccountsStore } from '../../stores/index.js';
import Extension from './Extension.js';
import State, { AuthUrls } from './State.js';
import State from './State.js';
import Tabs from './Tabs.js';
describe('Extension', () => {
@@ -7,6 +7,7 @@ import type { Registry, SignerPayloadJSON, SignerPayloadRaw } from '@polkadot/ty
import type { SubjectInfo } from '@polkadot/ui-keyring/observable/types';
import type { KeypairType } from '@polkadot/util-crypto/types';
import type { AccountJson, AllowedPath, AuthorizeRequest, MessageTypes, MetadataRequest, RequestAccountBatchExport, RequestAccountChangePassword, RequestAccountCreateExternal, RequestAccountCreateHardware, RequestAccountCreateSuri, RequestAccountEdit, RequestAccountExport, RequestAccountForget, RequestAccountShow, RequestAccountTie, RequestAccountValidate, RequestActiveTabsUrlUpdate, RequestAuthorizeApprove, RequestBatchRestore, RequestDeriveCreate, RequestDeriveValidate, RequestJsonRestore, RequestMetadataApprove, RequestMetadataReject, RequestSeedCreate, RequestSeedValidate, RequestSigningApprovePassword, RequestSigningApproveSignature, RequestSigningCancel, RequestSigningIsLocked, RequestTypes, RequestUpdateAuthorizedAccounts, ResponseAccountExport, ResponseAccountsExport, ResponseAuthorizeList, ResponseDeriveValidate, ResponseJsonGetAccountInfo, ResponseSeedCreate, ResponseSeedValidate, ResponseSigningIsLocked, ResponseType, SigningRequest } from '../types.js';
import type { AuthorizedAccountsDiff } from './State.js';
import { ALLOWED_PATH, PASSWORD_EXPIRY_MS } from '@polkadot/extension-base/defaults';
import { metadataExpand } from '@polkadot/extension-chains';
@@ -17,7 +18,7 @@ import { assert, isHex } from '@polkadot/util';
import { keyExtractSuri, mnemonicGenerate, mnemonicValidate } from '@polkadot/util-crypto';
import { withErrorLog } from './helpers.js';
import State, { AuthorizedAccountsDiff } from './State.js';
import State from './State.js';
import { createSubscription, unsubscribe } from './subscriptions.js';
type CachedUnlocks = Record<string, number>;
@@ -8,6 +8,7 @@ import type { JsonRpcResponse } from '@polkadot/rpc-provider/types';
import type { SignerPayloadJSON, SignerPayloadRaw } from '@polkadot/types/types';
import type { SubjectInfo } from '@polkadot/ui-keyring/observable/types';
import type { MessageTypes, RequestAccountList, RequestAccountUnsubscribe, RequestAuthorizeTab, RequestRpcSend, RequestRpcSubscribe, RequestRpcUnsubscribe, RequestTypes, ResponseRpcListProviders, ResponseSigning, ResponseTypes, SubscriptionMessageTypes } from '../types.js';
import type { AuthResponse } from './State.js';
import { PHISHING_PAGE_REDIRECT } from '@polkadot/extension-base/defaults';
import { canDerive } from '@polkadot/extension-base/utils';
@@ -19,7 +20,7 @@ import { assert, isNumber } from '@polkadot/util';
import RequestBytesSign from '../RequestBytesSign.js';
import RequestExtrinsicSign from '../RequestExtrinsicSign.js';
import { withErrorLog } from './helpers.js';
import State, { AuthResponse } from './State.js';
import State from './State.js';
import { createSubscription, unsubscribe } from './subscriptions.js';
interface AccountSub {
@@ -10,9 +10,9 @@ import type { Registry, SignerPayloadJSON, SignerPayloadRaw } from '@polkadot/ty
import type { KeyringPairs$Json } from '@polkadot/ui-keyring/types';
import type { HexString } from '@polkadot/util/types';
import type { KeypairType } from '@polkadot/util-crypto/types';
import type { AuthResponse, AuthUrls } from './handlers/State.js';
import { ALLOWED_PATH } from '../defaults.js';
import { AuthResponse, AuthUrls } from './handlers/State.js';
type KeysWithDefinedValues<T> = {
[K in keyof T]: T[K] extends undefined ? never : K