Skip to content

Commit df2b898

Browse files
Micah Zoltujxom
andauthored
feat: add missing re-exports. (wevm#3458)
* Adds missing re-exports. Without these, something as simple as the following results in a compiler error in projects that depend on viem:�```ts export const createReadClient = () => { return createWalletClient({ chain: mainnet, transport: custom(ethereum), cacheTime }).extend(publicActions) } ``` This is because `publicActions`'s return type depends on `CreateAccessList` and `Simulate*`. Note: The current mechanism of manually adding these things to `index.ts` seems ripe for this class of failure. It feels like either an alternative re-export system should be used (e.g., `export * from '...'`) or some automation should be built to ensure that everything is properly re-exported. I also added `.pnpm-store` to `.gitignore` because with out it this commit was going to be a bajillion files large as `pnpn install` drops a ton of stuff in that folder as a cache. * Create plenty-mayflies-leave.md --------- Co-authored-by: jxom <[email protected]>
1 parent 251ac67 commit df2b898

File tree

3 files changed

+27
-5
lines changed

3 files changed

+27
-5
lines changed

.changeset/plenty-mayflies-leave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"viem": patch
3+
---
4+
5+
Added missing re-exports.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ wagmi
1515
src/node/trustedSetups_esm.ts
1616
**/trusted-setups/**/*.txt
1717
.idea
18+
.pnpm-store
1819

1920
# local env files
2021
.env

src/index.ts

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ export {
6666
type CallParameters,
6767
type CallReturnType,
6868
} from './actions/public/call.js'
69+
export type {
70+
CreateAccessListParameters,
71+
CreateAccessListReturnType,
72+
CreateAccessListErrorType,
73+
} from './actions/public/createAccessList.js'
6974
export type {
7075
CreateBlockFilterErrorType,
7176
CreateBlockFilterReturnType,
@@ -267,6 +272,22 @@ export type {
267272
MulticallReturnType,
268273
} from './actions/public/multicall.js'
269274
export type { SnapshotErrorType } from './actions/test/snapshot.js'
275+
export type {
276+
SimulateBlocksParameters,
277+
SimulateBlocksReturnType,
278+
SimulateBlocksErrorType,
279+
} from './actions/public/simulateBlocks.js'
280+
export type {
281+
SimulateCallsParameters,
282+
SimulateCallsReturnType,
283+
SimulateCallsErrorType,
284+
} from './actions/public/simulateCalls.js'
285+
export type {
286+
GetMutabilityAwareValue,
287+
SimulateContractParameters,
288+
SimulateContractReturnType,
289+
SimulateContractErrorType,
290+
} from './actions/public/simulateContract.js'
270291
export type {
271292
OnBlock,
272293
OnBlockParameter,
@@ -419,11 +440,6 @@ export type {
419440
SignTypedDataParameters,
420441
SignTypedDataReturnType,
421442
} from './actions/wallet/signTypedData.js'
422-
export type {
423-
SimulateContractErrorType,
424-
SimulateContractParameters,
425-
SimulateContractReturnType,
426-
} from './actions/public/simulateContract.js'
427443
export type {
428444
StopImpersonatingAccountErrorType,
429445
StopImpersonatingAccountParameters,

0 commit comments

Comments
 (0)