Skip to content

Commit

Permalink
chore: tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm committed Sep 4, 2023
1 parent 6a3ffba commit d135f68
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 30 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
},
"knip": {
"ignore": ["**/*.test-d.ts", "**/vite-env.d.ts", "vitest.workspace.ts"],
"ignoreDependencies": ["only-allow"],
"ignoreBinaries": ["biome"],
"ignoreDependencies": ["@biomejs/biome", "@changesets/cli", "only-allow"],
"ignoreWorkspaces": ["docs", "packages/register-tests/**"],
"workspaces": {
".": { "entry": "scripts/*.ts" },
Expand Down
48 changes: 27 additions & 21 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,29 @@ export {
watchBlockNumber,
} from './actions/getBlockNumber.js'

export {
type GetChainIdReturnType,
getChainId,
type WatchChainIdParameters,
type WatchChainIdReturnType,
watchChainId,
} from './actions/getChainId.js'

export {
type GetConnectionsReturnType,
getConnections,
type WatchConnectionsParameters,
type WatchConnectionsReturnType,
watchConnections,
} from './actions/getConnections.js'

export {
type GetConnectorClientError,
type GetConnectorClientParameters,
type GetConnectorClientReturnType,
getConnectorClient,
} from './actions/getConnectorClient.js'

export {
type GetEnsAddressError,
type GetEnsAddressParameters,
Expand Down Expand Up @@ -101,27 +124,10 @@ export {
} from './actions/getTransaction.js'

export {
type GetChainIdReturnType,
getChainId,
type WatchChainIdParameters,
type WatchChainIdReturnType,
watchChainId,
} from './actions/getChainId.js'

export {
type GetConnectionsReturnType,
getConnections,
type WatchConnectionsParameters,
type WatchConnectionsReturnType,
watchConnections,
} from './actions/getConnections.js'

export {
type GetConnectorClientError,
type GetConnectorClientParameters,
type GetConnectorClientReturnType,
getConnectorClient,
} from './actions/getConnectorClient.js'
type MulticallParameters,
type MulticallReturnType,
multicall,
} from './actions/multicall.js'

export {
type PrepareSendTransactionError,
Expand Down
5 changes: 5 additions & 0 deletions packages/core/src/types/utils.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { assertType, expectTypeOf, test } from 'vitest'
import {
type Evaluate,
type ExactPartial,
type IsNever,
type Mutable,
type OneOf,
type PartialBy,
Expand All @@ -15,6 +16,10 @@ test('ExactPartial', () => {
}>()
})

test('IsNever', () => {
expectTypeOf<IsNever<never>>().toEqualTypeOf<true>()
})

test('Mutable', () => {
expectTypeOf<
Mutable<{ foo: boolean; readonly bar: boolean }>
Expand Down
7 changes: 0 additions & 7 deletions packages/core/src/types/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ export type IsNarrowable<type, type2> = IsUnknown<type> extends true
/** Checks if {@link type} is `never` */
export type IsNever<type> = [type] extends [never] ? true : false

/** Checks if {@link type} is union */
export type IsUnion<
type,
///
type2 = type,
> = type extends type2 ? ([type2] extends [type] ? false : true) : never

/** Checks if {@link type} is `unknown` */
export type IsUnknown<type> = unknown extends type ? true : false

Expand Down
7 changes: 6 additions & 1 deletion packages/react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ export { WagmiProviderNotFoundError } from './errors/context.js'
////////////////////////////////////////////////////////////////////////////////
// Hooks

export { type UseAccountReturnType, useAccount } from './hooks/useAccount.js'
export {
type UseAccountParameters,
type UseAccountReturnType,
useAccount,
} from './hooks/useAccount.js'

export {
type UseAccountEffectParameters,
Expand All @@ -58,6 +62,7 @@ export {
} from './hooks/useChainId.js'

export {
type UseConfigParameters,
type UseConfigReturnType,
useConfig,
} from './hooks/useConfig.js'
Expand Down

1 comment on commit d135f68

@vercel
Copy link

@vercel vercel bot commented on d135f68 Sep 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

wagmi-v2 – ./docs

wagmi-v2.vercel.app
wagmi-v2-git-alpha-wagmi-dev.vercel.app
alpha.wagmi.sh
wagmi-v2-wagmi-dev.vercel.app

Please sign in to comment.