Align tsconfig to allow moduleResolution: nodenext (#9152)

* Align tsconfig to allow moduleResolution: nodenext

* Fix bounty

* Additional from tsc --noEmit check
This commit is contained in:
Jaco 2023-03-12 10:53:21 +02:00 committed by GitHub
parent 4bcb7df323
commit b82cae49ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
63 changed files with 172 additions and 171 deletions

View File

@ -5,10 +5,11 @@ import type { AccountBalance } from '../types.js';
import React from 'react';
import { useTranslation } from '@polkadot/app-treasury/translate';
import { CardSummary, SummaryBox } from '@polkadot/react-components';
import { FormatBalance } from '@polkadot/react-query';
import { useTranslation } from '../translate.js';
interface Props {
className?: string;
balance?: AccountBalance;

View File

@ -5,7 +5,7 @@ import { fireEvent, screen, within } from '@testing-library/react';
import { POLKADOT_GENESIS } from '@polkadot/apps-config';
import i18next from '@polkadot/react-components/i18n';
import { toShortAddress } from '@polkadot/react-components/util/toShortAddress';
import { toShortAddress } from '@polkadot/react-components/util';
import { AddressFlags } from '@polkadot/react-hooks/types';
import { anAccountWithBalance, anAccountWithBalanceAndMeta, anAccountWithInfo, anAccountWithInfoAndMeta, anAccountWithMeta, anAccountWithStaking } from '@polkadot/test-support/creation/account';
import { makeStakingLedger as ledger } from '@polkadot/test-support/creation/stakingInfo/stakingLedger';

View File

@ -4,8 +4,8 @@
import React, { useCallback } from 'react';
import { Input, Modal } from '@polkadot/react-components';
import { useTranslation } from '@polkadot/react-components/translate';
import { useTranslation } from '../translate.js';
import PasswordInput from './PasswordInput.js';
interface AccountName {

View File

@ -8,8 +8,7 @@ import type { BN } from '@polkadot/util';
import React, { useEffect, useState } from 'react';
import { checkAddress } from '@polkadot/phishing';
import { InputAddress, InputBalance, MarkError, MarkWarning, styled, Toggle, TxButton } from '@polkadot/react-components';
import Modal from '@polkadot/react-components/Modal';
import { InputAddress, InputBalance, MarkError, MarkWarning, Modal, styled, Toggle, TxButton } from '@polkadot/react-components';
import { useApi, useCall } from '@polkadot/react-hooks';
import { Available } from '@polkadot/react-query';
import { BN_HUNDRED, BN_ZERO, isFunction, nextTick } from '@polkadot/util';

View File

@ -8,7 +8,6 @@ import React, { Suspense } from 'react';
import { MemoryRouter } from 'react-router-dom';
import { ThemeProvider } from 'styled-components';
import BountiesApp from '@polkadot/app-bounties/index';
import { lightTheme } from '@polkadot/apps/themes';
import { ApiCtxRoot } from '@polkadot/react-api';
import { createApi } from '@polkadot/test-support/api/index';
@ -18,6 +17,8 @@ import { WaitForApi } from '@polkadot/test-support/react/index';
import { execute } from '@polkadot/test-support/transaction/execute';
import { BN } from '@polkadot/util';
import BountiesApp from './index.js';
const SUBSTRATE_PORT = Number.parseInt(process.env.TEST_SUBSTRATE_PORT || '30333');
const renderBounties = () => {

View File

@ -5,12 +5,12 @@ import type { BN } from '@polkadot/util';
import React, { useMemo, useRef } from 'react';
import Summary from '@polkadot/app-bounties/Summary';
import { Button, styled, Table } from '@polkadot/react-components';
import { useBounties } from './hooks/index.js';
import Bounty from './Bounty.js';
import BountyCreate from './BountyCreate.js';
import Summary from './Summary.js';
import { useTranslation } from './translate.js';
interface Props {

View File

@ -6,11 +6,11 @@ import type { BN } from '@polkadot/util';
import React, { useMemo } from 'react';
import { useBounties } from '@polkadot/app-bounties/hooks';
import { TxButton } from '@polkadot/react-components';
import { useAccounts } from '@polkadot/react-hooks';
import { isClaimable } from '../helpers/index.js';
import { useBounties } from '../hooks/index.js';
import { useTranslation } from '../translate.js';
interface Props {

View File

@ -5,12 +5,12 @@ import type { BN } from '@polkadot/util';
import React, { useCallback, useEffect, useState } from 'react';
import { useBalance, useBounties } from '@polkadot/app-bounties/hooks';
import { Button, Input, InputAddress, InputBalance, MarkError, Modal, TxButton } from '@polkadot/react-components';
import { useToggle } from '@polkadot/react-hooks';
import { BN_ZERO } from '@polkadot/util';
import { calculateBountyBond, countUtf8Bytes } from './helpers/index.js';
import { useBalance, useBounties } from './hooks/index.js';
import { useTranslation } from './translate.js';
const MIN_TITLE_LEN = 1;

View File

@ -5,10 +5,10 @@ import type { AccountId, BountyIndex } from '@polkadot/types/interfaces';
import React from 'react';
import { useBounties } from '@polkadot/app-bounties/hooks';
import { InputAddress, Modal, TxButton } from '@polkadot/react-components';
import { truncateTitle } from '../helpers/index.js';
import { useBounties } from '../hooks/index.js';
import { useTranslation } from '../translate.js';
interface Props {

View File

@ -6,11 +6,11 @@ import type { BountyStatus } from '@polkadot/types/interfaces';
import React, { useMemo } from 'react';
import VotingDescriptionInfo from '@polkadot/app-bounties/BountyInfos/VotingDescriptionInfo';
import { styled } from '@polkadot/react-components';
import { useCollectiveMembers } from '@polkadot/react-hooks';
import { useTranslation } from '../translate.js';
import VotingDescriptionInfo from './VotingDescriptionInfo.js';
import VotingLink from './VotingLink.js';
interface Props {

View File

@ -5,10 +5,9 @@ import type { BountyStatus } from '@polkadot/types/interfaces';
import React, { useMemo } from 'react';
import { useBountyStatus } from '@polkadot/app-bounties/hooks';
import { BN, BN_HUNDRED, BN_ZERO } from '@polkadot/util';
import { useBounties } from '../hooks/index.js';
import { useBounties, useBountyStatus } from '../hooks/index.js';
import { useTranslation } from '../translate.js';
import BountyInfo from './BountyInfo.js';

View File

@ -1,10 +1,11 @@
// Copyright 2017-2023 @polkadot/app-bounties authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { calculateBountyBond } from '@polkadot/app-bounties/helpers/calculateBountyBond';
import { TypeRegistry } from '@polkadot/types/create';
import { BN } from '@polkadot/util';
import { calculateBountyBond } from './calculateBountyBond.js';
describe('Calculate bounty bond', () => {
it('sums deposit base and deposit for each byte of description', () => {
const registry = new TypeRegistry();

View File

@ -1,11 +1,12 @@
// Copyright 2017-2023 @polkadot/app-bounties authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { determineUnassignCuratorAction } from '@polkadot/app-bounties/helpers/determineUnassignCuratorAction';
import { createAugmentedApi } from '@polkadot/test-support/api/index';
import { BountyFactory } from '@polkadot/test-support/creation/bounties/bountyFactory';
import { BN } from '@polkadot/util';
import { determineUnassignCuratorAction } from './determineUnassignCuratorAction.js';
describe('adjust slash curator component for', () => {
const augmentedApi = createAugmentedApi();
const { aBountyStatus } = new BountyFactory(augmentedApi);

View File

@ -3,8 +3,7 @@
import type { DeriveCollectiveProposal } from '@polkadot/api-derive/types';
import type { BountyStatus } from '@polkadot/types/interfaces';
import { BountyVotingStatuses, StatusName } from '../types.js';
import type { BountyVotingStatuses, StatusName } from '../types.js';
const validProposalNames: BountyVotingStatuses = {
Active: ['closeBounty', 'unassignCurator'],

View File

@ -2,8 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { BountyStatus } from '@polkadot/types/interfaces';
import { BountyStatusType, StatusName } from '../types.js';
import type { BountyStatusType, StatusName } from '../types.js';
export const getBountyStatus = (status: BountyStatus): BountyStatusType => {
const statusAsString = status.type as StatusName;

View File

@ -1,9 +1,9 @@
// Copyright 2017-2023 @polkadot/app-bounties authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { DeriveBalancesAll } from '@polkadot/api-derive/types';
import type { Balance } from '@polkadot/types/interfaces';
import { DeriveBalancesAll } from '@polkadot/api-derive/types';
import { createNamedHook, useApi, useCall } from '@polkadot/react-hooks';
function useBalanceImpl (accountId: string | null): Balance | undefined {

View File

@ -3,12 +3,12 @@
import type { ApiPromise } from '@polkadot/api';
import type { SubmittableExtrinsicFunction } from '@polkadot/api/types';
import type { DeriveBounties } from '@polkadot/api-derive/types';
import type { Codec } from '@polkadot/types/types';
import type { BN } from '@polkadot/util';
import { useMemo } from 'react';
import { DeriveBounties } from '@polkadot/api-derive/types';
import { createNamedHook, useApi, useBestNumber, useCall } from '@polkadot/react-hooks';
import { BN_ZERO } from '@polkadot/util';

View File

@ -1,14 +1,15 @@
// Copyright 2017-2023 @polkadot/app-bounties authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { BountyStatusType } from '@polkadot/app-bounties/types';
import type { BountyStatusType } from '../types.js';
import { useCallback } from 'react';
import { getBountyStatus } from '@polkadot/app-bounties/helpers';
import { createNamedHook } from '@polkadot/react-hooks';
import { BountyStatus } from '@polkadot/types/interfaces';
import { getBountyStatus } from '../helpers/index.js';
function useBountyStatusImpl (status: BountyStatus): BountyStatusType {
const updateStatus = useCallback(() => getBountyStatus(status), [status]);

View File

@ -2,13 +2,12 @@
// SPDX-License-Identifier: Apache-2.0
import type { AccountId } from '@polkadot/types/interfaces';
import type { UserRole } from '../types.js';
import { useMemo } from 'react';
import { createNamedHook, useAccounts, useCollectiveMembers } from '@polkadot/react-hooks';
import { UserRole } from '../types.js';
export type UserRolesInfo = { roles: UserRole[], isCurator: boolean };
function useUserRoleImpl (curatorId?: AccountId): UserRolesInfo {

View File

@ -11,8 +11,6 @@ import { ThemeProvider } from 'styled-components';
import { ApiPromise } from '@polkadot/api';
import { DeriveCollectiveProposal } from '@polkadot/api-derive/types';
import Bounties from '@polkadot/app-bounties/Bounties';
import { BountyApi } from '@polkadot/app-bounties/hooks';
import { lightTheme } from '@polkadot/apps/themes';
import { POLKADOT_GENESIS } from '@polkadot/apps-config';
import { ApiCtx } from '@polkadot/react-api';
@ -24,6 +22,8 @@ import { BountyFactory } from '@polkadot/test-support/creation/bounties/bountyFa
import { TypeRegistry } from '@polkadot/types/create';
import { BountyIndex, BountyStatus } from '@polkadot/types/interfaces';
import Bounties from '../../src/Bounties.js';
import { BountyApi } from '../../src/hooks/index.js';
import { mockBountyHooks } from '../hooks/defaults.js';
import { clickButtonWithName } from '../utils/clickButtonWithName.js';
import { clickElementWithTestId } from '../utils/clickElementWithTestId.js';

View File

@ -5,10 +5,10 @@ import type { AppProps as Props } from '@polkadot/react-components/types';
import React, { useRef } from 'react';
import { useTranslation } from '@polkadot/app-contracts/translate';
import { Tabs } from '@polkadot/react-components';
import Contracts from './Contracts/index.js';
import { useTranslation } from './translate.js';
function ContractsApp ({ basePath, className = '' }: Props): React.ReactElement<Props> {
const { t } = useTranslation();

View File

@ -16,8 +16,7 @@ import uiKeyring from '@polkadot/ui-keyring';
import * as util from '@polkadot/util';
import * as hashing from '@polkadot/util-crypto';
import allSnippets from './snippets/index.js';
import makeWrapper from './snippets/wrapping.js';
import { allSnippets, makeWrapper } from './snippets/index.js';
import ActionButtons from './ActionButtons.js';
import { CUSTOM_LABEL, STORE_EXAMPLES, STORE_SELECTED } from './constants.js';
import Output from './Output.js';

View File

@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/app-js authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Snippet } from '@polkadot/app-js/types';
import type { Snippet } from '../types.js';
// We must fix this :(
/* eslint-disable sort-keys */

View File

@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/app-js authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Snippet } from '@polkadot/app-js/types';
import type { Snippet } from '../types.js';
// We must fix this :(
/* eslint-disable sort-keys */

View File

@ -1,14 +1,14 @@
// Copyright 2017-2023 @polkadot/app-js authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Snippet } from './../types.js';
import { constsStakingParameters } from './consts-examples.js';
import { extrinsicMakeTransfer } from './extrinsics-examples.js';
import { rpcNetworkAuthoring, rpcNewHead, rpcQueryState, rpcSysthemInfo } from './rpc-examples.js';
import { storageGetInfo, storageKeys, storageListenToBalanceChange, storageListenToMultipleBalancesChange, storageRetrieveInfoOnQueryKeys, storageSystemEvents } from './storage-examples.js';
const snippets: Snippet[] = [
export { makeWrapper } from './wrapping.js';
export const allSnippets = [
rpcNetworkAuthoring,
rpcNewHead,
rpcQueryState,
@ -21,6 +21,4 @@ const snippets: Snippet[] = [
storageKeys,
constsStakingParameters,
extrinsicMakeTransfer
];
export default snippets;
] as const;

View File

@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/app-js authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Snippet } from '@polkadot/app-js/types';
import type { Snippet } from '../types.js';
// We must fix this :(
/* eslint-disable sort-keys */

View File

@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/app-js authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Snippet } from '@polkadot/app-js/types';
import type { Snippet } from '../types.js';
const label = {
children: 'Storage',

View File

@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/app-js authors & contributors
// SPDX-License-Identifier: Apache-2.0
export default function makeWrapper (isDevelopment: boolean): string {
export function makeWrapper (isDevelopment: boolean): string {
const args = `api, hashing, ${isDevelopment ? 'keyring, ' : ''}types, util`;
return `// All code is wrapped within an async closure,

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { DefinitionCallNamed } from '@polkadot/types/types';
import type { DropdownOption } from '../util/types';
import type { DropdownOption } from '../util/types.js';
import React, { useCallback } from 'react';

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { DefinitionCallNamed } from '@polkadot/types/types';
import type { DropdownOptions } from '../util/types';
import type { DropdownOptions } from '../util/types.js';
import React from 'react';

View File

@ -4,7 +4,7 @@
// TODO: We have a lot shared between this and InputExtrinsic & InputStorage
import type { DefinitionCallNamed } from '@polkadot/types/types';
import type { DropdownOptions } from '../util/types';
import type { DropdownOptions } from '../util/types.js';
import React, { useCallback, useEffect, useState } from 'react';

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { DefinitionCallNamed } from '@polkadot/types/types';
import type { DropdownOption, DropdownOptions } from '../../util/types';
import type { DropdownOption, DropdownOptions } from '../../util/types.js';
import React from 'react';

View File

@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/react-components authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { DropdownOptions } from '../util/types';
import type { DropdownOptions } from '../util/types.js';
import type { ConstValueBase } from './types.js';
import React from 'react';

View File

@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/react-components authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { DropdownOptions } from '../util/types';
import type { DropdownOptions } from '../util/types.js';
import type { ConstValueBase, StorageEntryPromise } from './types.js';
import React from 'react';

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { ConstantCodec } from '@polkadot/types/metadata/decorate/types';
import type { DropdownOptions } from '../util/types';
import type { DropdownOptions } from '../util/types.js';
import type { ConstValue, ConstValueBase } from './types.js';
import React, { useCallback, useState } from 'react';

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { ConstantCodec } from '@polkadot/types/metadata/decorate/types';
import type { DropdownOption, DropdownOptions } from '../../util/types';
import type { DropdownOption, DropdownOptions } from '../../util/types.js';
import React from 'react';

View File

@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/react-components authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { DropdownOptions } from '../../util/types';
import type { DropdownOptions } from '../../util/types.js';
import { ApiPromise } from '@polkadot/api';

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { SubmittableExtrinsicFunction } from '@polkadot/api/types';
import type { DropdownOptions } from '../util/types';
import type { DropdownOptions } from '../util/types.js';
import React, { useCallback } from 'react';

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { SubmittableExtrinsicFunction } from '@polkadot/api/types';
import type { DropdownOptions } from '../util/types';
import type { DropdownOptions } from '../util/types.js';
import React from 'react';

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { SubmittableExtrinsicFunction } from '@polkadot/api/types';
import type { DropdownOptions } from '../util/types';
import type { DropdownOptions } from '../util/types.js';
import React, { useCallback, useState } from 'react';

View File

@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/react-components authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { DropdownOption, DropdownOptions } from '../../util/types';
import type { DropdownOption, DropdownOptions } from '../../util/types.js';
import React from 'react';

View File

@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/react-components authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { DropdownOptions } from '../../util/types';
import type { DropdownOptions } from '../../util/types.js';
import { ApiPromise } from '@polkadot/api';

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { DefinitionRpcExt } from '@polkadot/types/types';
import type { DropdownOption } from '../util/types';
import type { DropdownOption } from '../util/types.js';
import React, { useCallback } from 'react';

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { DefinitionRpcExt } from '@polkadot/types/types';
import type { DropdownOptions } from '../util/types';
import type { DropdownOptions } from '../util/types.js';
import React from 'react';

View File

@ -4,7 +4,7 @@
// TODO: We have a lot shared between this and InputExtrinsic & InputStorage
import type { DefinitionRpcExt } from '@polkadot/types/types';
import type { DropdownOptions } from '../util/types';
import type { DropdownOptions } from '../util/types.js';
import React, { useCallback, useEffect, useState } from 'react';

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { DefinitionRpcExt } from '@polkadot/types/types';
import type { DropdownOption, DropdownOptions } from '../../util/types';
import type { DropdownOption, DropdownOptions } from '../../util/types.js';
import React from 'react';

View File

@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/react-components authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { DropdownOptions } from '../../util/types';
import type { DropdownOptions } from '../../util/types.js';
import { ApiPromise } from '@polkadot/api';

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { QueryableStorageEntry } from '@polkadot/api/types';
import type { DropdownOptions } from '../util/types';
import type { DropdownOptions } from '../util/types.js';
import React from 'react';

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { QueryableStorageEntry } from '@polkadot/api/types';
import type { DropdownOptions } from '../util/types';
import type { DropdownOptions } from '../util/types.js';
import React from 'react';

View File

@ -4,7 +4,7 @@
// TODO: We have a lot shared between this and InputExtrinsic
import type { QueryableStorageEntry } from '@polkadot/api/types';
import type { DropdownOptions } from '../util/types';
import type { DropdownOptions } from '../util/types.js';
import React, { useCallback, useState } from 'react';

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { StorageEntry } from '@polkadot/types/primitive/types';
import type { DropdownOption, DropdownOptions } from '../../util/types';
import type { DropdownOption, DropdownOptions } from '../../util/types.js';
import React from 'react';

View File

@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/react-components authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { DropdownOption, DropdownOptions } from '../../util/types';
import type { DropdownOption, DropdownOptions } from '../../util/types.js';
import { ApiPromise } from '@polkadot/api';

View File

@ -7,7 +7,7 @@ import type { SubmittableExtrinsic } from '@polkadot/api/types';
import type { Abi } from '@polkadot/api-contract';
import type { ThemeDef } from '@polkadot/react-hooks/ctx/types';
import type { AccountId, Index } from '@polkadot/types/interfaces';
import type { ActionStatus, TxCallback, TxFailedCallback } from './Status/types';
import type { ActionStatus, TxCallback, TxFailedCallback } from './Status/types.js';
import { AccountIndex, Address } from '@polkadot/types/interfaces';

View File

@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/react-hooks authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Accounts } from './ctx/types';
import type { Accounts } from './ctx/types.js';
import { useContext } from 'react';

View File

@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/react-hooks authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Addresses } from './ctx/types';
import type { Addresses } from './ctx/types.js';
import { useContext } from 'react';

View File

@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/react-components authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ApiStats } from './ctx/types';
import type { ApiStats } from './ctx/types.js';
import { useContext } from 'react';

View File

@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/react-hooks authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { BlockAuthors } from './ctx/types';
import type { BlockAuthors } from './ctx/types.js';
import { useContext } from 'react';

View File

@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/react-hooks authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { BlockEvents } from './ctx/types';
import type { BlockEvents } from './ctx/types.js';
import { useContext } from 'react';

View File

@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/react-hooks authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Accounts, Addresses } from './ctx/types';
import type { Accounts, Addresses } from './ctx/types.js';
import { useContext } from 'react';

View File

@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/react-hooks authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ThemeDef } from './ctx/types';
import type { ThemeDef } from './ctx/types.js';
import { useContext, useMemo } from 'react';
import { ThemeContext } from 'styled-components';

View File

@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/react-hooks authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { WindowSize } from './ctx/types';
import type { WindowSize } from './ctx/types.js';
import { useContext } from 'react';

View File

@ -6,103 +6,107 @@
"jsx": "react",
"resolveJsonModule": true,
"paths": {
"@polkadot/apps/*": ["apps/src/*"],
"@polkadot/apps": ["apps/src"],
"@polkadot/apps-config": ["apps-config/src"],
"@polkadot/apps-config/*": ["apps-config/src/*"],
"@polkadot/apps-routing": ["apps-routing/src"],
"@polkadot/apps-routing/*": ["apps-routing/src/*"],
"@polkadot/app-accounts": ["page-accounts/src"],
"@polkadot/app-accounts/*": ["page-accounts/src/*"],
"@polkadot/app-addresses": ["page-addresses/src"],
"@polkadot/app-addresses/*": ["page-addresses/src/*"],
"@polkadot/app-alliance": ["page-alliance/src"],
"@polkadot/app-alliance/*": ["page-alliance/src/*"],
"@polkadot/app-assets": ["page-assets/src"],
"@polkadot/app-assets/*": ["page-assets/src/*"],
"@polkadot/app-bounties": ["page-bounties/src"],
"@polkadot/app-bounties/*": ["page-bounties/src/*"],
"@polkadot/app-calendar": ["page-calendar/src"],
"@polkadot/app-calendar/*": ["page-calendar/src/*"],
"@polkadot/app-claims": ["page-claims/src"],
"@polkadot/app-claims/*": ["page-claims/src/*"],
"@polkadot/app-collator": ["page-collator/src"],
"@polkadot/app-collator/*": ["page-collator/src/*"],
"@polkadot/app-contracts": ["page-contracts/src"],
"@polkadot/app-contracts/*": ["page-contracts/src/*"],
"@polkadot/app-council": ["page-council/src"],
"@polkadot/app-council/*": ["page-council/src/*"],
"@polkadot/app-democracy": ["page-democracy/src"],
"@polkadot/app-democracy/*": ["page-democracy/src/*"],
"@polkadot/app-extrinsics": ["page-extrinsics/src"],
"@polkadot/app-extrinsics/*": ["page-extrinsics/src/*"],
"@polkadot/app-explorer": ["page-explorer/src"],
"@polkadot/app-explorer/*": ["page-explorer/src/*"],
"@polkadot/app-fellowship": ["page-fellowship/src"],
"@polkadot/app-fellowship/*": ["page-fellowship/src/*"],
"@polkadot/app-files": ["page-files/src"],
"@polkadot/app-files/*": ["page-files/src/*"],
"@polkadot/app-gilt": ["page-gilt/src"],
"@polkadot/app-gilt/*": ["page-gilt/src/*"],
"@polkadot/app-i18n": ["page-i18n/src"],
"@polkadot/app-i18n/*": ["page-i18n/src/*"],
"@polkadot/app-js": ["page-js/src"],
"@polkadot/app-js/*": ["page-js/src/*"],
"@polkadot/app-membership": ["page-membership/src"],
"@polkadot/app-membership/*": ["page-membership/src/*"],
"@polkadot/app-nfts": ["page-nfts/src"],
"@polkadot/app-nfts/*": ["page-nfts/src/*"],
"@polkadot/app-parachains": ["page-parachains/src"],
"@polkadot/app-parachains/*": ["page-parachains/src/*"],
"@polkadot/app-poll": ["page-poll/src"],
"@polkadot/app-poll/*": ["page-poll/src/*"],
"@polkadot/app-preimages": ["page-preimages/src"],
"@polkadot/app-preimages/*": ["page-preimages/src/*"],
"@polkadot/app-ranked": ["page-ranked/src"],
"@polkadot/app-ranked/*": ["page-ranked/src/*"],
"@polkadot/app-referenda": ["page-referenda/src"],
"@polkadot/app-referenda/*": ["page-referenda/src/*"],
"@polkadot/app-rpc": ["page-rpc/src"],
"@polkadot/app-rpc/*": ["page-rpc/src/*"],
"@polkadot/app-runtime": ["page-runtime/src"],
"@polkadot/app-runtime/*": ["page-runtime/src/*"],
"@polkadot/app-scheduler": ["page-scheduler/src"],
"@polkadot/app-scheduler/*": ["page-scheduler/src/*"],
"@polkadot/app-settings": ["page-settings/src"],
"@polkadot/app-settings/*": ["page-settings/src/*"],
"@polkadot/app-signing": ["page-signing/src"],
"@polkadot/app-signing/*": ["page-signing/src/*"],
"@polkadot/app-society": ["page-society/src"],
"@polkadot/app-society/*": ["page-society/src/*"],
"@polkadot/app-staking": ["page-staking/src"],
"@polkadot/app-staking/*": ["page-staking/src/*"],
"@polkadot/app-staking2": ["page-staking2/src"],
"@polkadot/app-staking2/*": ["page-staking2/src/*"],
"@polkadot/app-storage": ["page-storage/src"],
"@polkadot/app-storage/*": ["page-storage/src/*"],
"@polkadot/app-sudo": ["page-sudo/src"],
"@polkadot/app-sudo/*": ["page-sudo/src/*"],
"@polkadot/app-tech-comm": ["page-tech-comm/src"],
"@polkadot/app-tech-comm/*": ["page-tech-comm/src/*"],
"@polkadot/app-treasury": ["page-treasury/src"],
"@polkadot/app-treasury/*": ["page-treasury/src/*"],
"@polkadot/app-utilities": ["page-utilities/src"],
"@polkadot/app-utilities/*": ["page-utilities/src/*"],
"@polkadot/app-whitelist": ["page-whitelist/src"],
"@polkadot/app-whitelist/*": ["page-whitelist/src/*"],
"@polkadot/react-api": ["react-api/src"],
"@polkadot/react-api/*": ["react-api/src/*"],
"@polkadot/react-components": ["react-components/src"],
"@polkadot/react-components/*": ["react-components/src/*"],
"@polkadot/react-hooks": ["react-hooks/src"],
"@polkadot/react-hooks/*": ["react-hooks/src/*"],
"@polkadot/react-params": ["react-params/src"],
"@polkadot/react-params/*": ["react-params/src/*"],
"@polkadot/react-query": ["react-query/src"],
"@polkadot/react-query/*": ["react-query/src/*"],
"@polkadot/react-signer": ["react-signer/src"],
"@polkadot/react-signer/*": ["react-signer/src/*"],
"@polkadot/test-support/": ["test-support/src/"],
"@polkadot/apps": ["apps/src/index.tsx"],
"@polkadot/apps/Root": ["apps/src/Root.tsx"],
"@polkadot/apps/themes": ["apps/src/themes.ts"],
"@polkadot/apps-config": ["apps-config/src/index.ts"],
"@polkadot/apps-config/endpoints": ["apps-config/src/endpoints/index.ts"],
"@polkadot/apps-config/endpoints/*": ["apps-config/src/endpoints/*.ts"],
"@polkadot/apps-config/links/*": ["apps-config/src/links/*.ts"],
"@polkadot/apps-config/settings/*": ["apps-config/src/settings/*.ts"],
"@polkadot/apps-config/ui/logos/*": ["apps-config/src/ui/logos/*/index.ts"],
"@polkadot/apps-routing": ["apps-routing/src/index.ts"],
"@polkadot/apps-routing/*": ["apps-routing/src/*.ts"],
"@polkadot/app-accounts": ["page-accounts/src/index.tsx"],
"@polkadot/app-accounts/modals/Transfer": ["page-accounts/src/modals/Transfer.tsx"],
"@polkadot/app-accounts/Sidebar": ["page-accounts/src/Sidebar/index.tsx"],
"@polkadot/app-addresses": ["page-addresses/src/index.tsx"],
"@polkadot/app-alliance": ["page-alliance/src/index.tsx"],
"@polkadot/app-assets": ["page-assets/src/index.tsx"],
"@polkadot/app-bounties": ["page-bounties/src/index.tsx"],
"@polkadot/app-calendar": ["page-calendar/src/index.tsx"],
"@polkadot/app-claims": ["page-claims/src/index.tsx"],
"@polkadot/app-claims/useCounter": ["page-claims/src/useCounter.ts"],
"@polkadot/app-collator": ["page-collator/src/index.tsx"],
"@polkadot/app-contracts": ["page-contracts/src/index.tsx"],
"@polkadot/app-council": ["page-council/src/index.tsx"],
"@polkadot/app-democracy": ["page-democracy/src/index.tsx"],
"@polkadot/app-democracy/*": ["page-democracy/src/*.tsx"],
"@polkadot/app-extrinsics": ["page-extrinsics/src/index.tsx"],
"@polkadot/app-explorer": ["page-explorer/src/index.tsx"],
"@polkadot/app-explorer/*": ["page-explorer/src/*.tsx"],
"@polkadot/app-fellowship": ["page-fellowship/src/index.tsx"],
"@polkadot/app-files": ["page-files/src/index.tsx"],
"@polkadot/app-gilt": ["page-gilt/src/index.tsx"],
"@polkadot/app-i18n": ["page-i18n/src/index.tsx"],
"@polkadot/app-js": ["page-js/src/index.tsx"],
"@polkadot/app-membership": ["page-membership/src/index.tsx"],
"@polkadot/app-nfts": ["page-nfts/src/index.tsx"],
"@polkadot/app-parachains": ["page-parachains/src/index.tsx"],
"@polkadot/app-parachains/Teleport": ["page-parachains/src/Teleport.tsx"],
"@polkadot/app-parachains/useLeaseRanges": ["page-parachains/src/useLeaseRanges.ts"],
"@polkadot/app-poll": ["page-poll/src/index.tsx"],
"@polkadot/app-preimages": ["page-preimages/src/index.tsx"],
"@polkadot/app-preimages/Preimages/Add": ["page-preimages/src/Preimages/Add/index.tsx"],
"@polkadot/app-preimages/Preimages/Call": ["page-preimages/src/Preimages/Call.tsx"],
"@polkadot/app-preimages/Preimages/Hash": ["page-preimages/src/Preimages/Hash.tsx"],
"@polkadot/app-ranked": ["page-ranked/src/index.tsx"],
"@polkadot/app-ranked/*": ["page-ranked/src/*.tsx"],
"@polkadot/app-referenda": ["page-referenda/src/index.tsx"],
"@polkadot/app-referenda/Referenda": ["page-referenda/src/Referenda/index.tsx"],
"@polkadot/app-referenda/useAccountLocks": ["page-referenda/src/useAccountLocks.ts"],
"@polkadot/app-referenda/useCounter": ["page-referenda/src/useCounter.ts"],
"@polkadot/app-rpc": ["page-rpc/src/index.tsx"],
"@polkadot/app-runtime": ["page-runtime/src/index.tsx"],
"@polkadot/app-scheduler": ["page-scheduler/src/index.tsx"],
"@polkadot/app-settings": ["page-settings/src/index.tsx"],
"@polkadot/app-settings/useCounter": ["page-settings/src/useCounter.ts"],
"@polkadot/app-settings/util": ["page-settings/src/util.tsx"],
"@polkadot/app-signing": ["page-signing/src/index.tsx"],
"@polkadot/app-society": ["page-society/src/index.tsx"],
"@polkadot/app-staking": ["page-staking/src/index.tsx"],
"@polkadot/app-staking/Legend": ["page-staking/src/Legend.tsx"],
"@polkadot/app-staking2": ["page-staking2/src/index.tsx"],
"@polkadot/app-staking2/Pools": ["page-staking2/src/Pools/index.tsx"],
"@polkadot/app-staking2/Pools/*": ["page-staking2/src/Pools/*.ts"],
"@polkadot/app-storage": ["page-storage/src/index.tsx"],
"@polkadot/app-sudo": ["page-sudo/src/index.tsx"],
"@polkadot/app-tech-comm": ["page-tech-comm/src/index.tsx"],
"@polkadot/app-tech-comm/App": ["page-tech-comm/src/App.tsx"],
"@polkadot/app-tech-comm/Proposals": ["page-tech-comm/src/Proposals/index.tsx"],
"@polkadot/app-treasury": ["page-treasury/src/index.tsx"],
"@polkadot/app-utilities": ["page-utilities/src/index.tsx"],
"@polkadot/app-whitelist": ["page-whitelist/src/index.tsx"],
"@polkadot/react-api": ["react-api/src/index.ts"],
"@polkadot/react-api/hoc": ["react-api/src/hoc/index.ts"],
"@polkadot/react-api/util": ["react-api/src/util/index.ts"],
"@polkadot/react-api/*": ["react-api/src/*.ts"],
"@polkadot/react-components": ["react-components/src/index.ts"],
"@polkadot/react-components/i18n": ["react-components/src/i18n/index.ts"],
"@polkadot/react-components/i18n/*": ["react-components/src/i18n/*.ts"],
"@polkadot/react-components/InputConsts/*": ["react-components/src/InputConsts/*.ts"],
"@polkadot/react-components/Popup/*": ["react-components/src/Popup/*.ts"],
"@polkadot/react-components/Status/*": ["react-components/src/Status/*.ts"],
"@polkadot/react-components/styled": ["react-components/src/styled.ts"],
"@polkadot/react-components/styles": ["react-components/src/styles/index.ts"],
"@polkadot/react-components/styles/*": ["react-components/src/styles/*.ts"],
"@polkadot/react-components/Tabs/*": ["react-components/src/Tabs/*.ts"],
"@polkadot/react-components/types": ["react-components/src/types.ts"],
"@polkadot/react-components/util": ["react-components/src/util/index.ts"],
"@polkadot/react-components/util/types": ["react-components/src/util/types.ts"],
"@polkadot/react-components/*": ["react-components/src/*.tsx"],
"@polkadot/react-hooks": ["react-hooks/src/index.ts"],
"@polkadot/react-hooks/ctx/types": ["react-hooks/src/ctx/types.ts"],
"@polkadot/react-hooks/ctx/*": ["react-hooks/src/ctx/*.tsx"],
"@polkadot/react-hooks/*": ["react-hooks/src/*.ts"],
"@polkadot/react-params": ["react-params/src/index.tsx"],
"@polkadot/react-params/Param/*": ["react-params/src/Param/*.tsx"],
"@polkadot/react-params/types": ["react-params/src/types.ts"],
"@polkadot/react-params/util": ["react-params/src/util.ts"],
"@polkadot/react-params/valueToText": ["react-params/src/valueToText.tsx"],
"@polkadot/react-query": ["react-query/src/index.ts"],
"@polkadot/react-signer": ["react-signer/src/index.tsx"],
"@polkadot/react-signer/signers/*": ["react-signer/src/signers/*.ts"],
"@polkadot/test-support/*": ["test-support/src/*.ts", "test-support/src/*.tsx"]
},
"skipLibCheck": true