Skip to content

Commit

Permalink
feat: add node16Modules flag for hardhat (#880)
Browse files Browse the repository at this point in the history
Co-authored-by: Raymond Feng <enjoyjava@gmail.com>
  • Loading branch information
krzkaczor and raymondfeng authored Oct 15, 2023
1 parent 77e0de7 commit da71c45
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/hungry-suits-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@typechain/hardhat': minor
---

Allow passing node16Modules flag to TypeChain
1 change: 1 addition & 0 deletions packages/hardhat/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export function getDefaultTypechainConfig(config: HardhatConfig): TypechainConfi
discriminateTypes: false,
tsNocheck: false,
dontOverrideCompile: false,
node16Modules: false,
}

return {
Expand Down
1 change: 1 addition & 0 deletions packages/hardhat/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ subtask(TASK_TYPECHAIN_GENERATE_TYPES)
discriminateTypes: typechainCfg.discriminateTypes,
tsNocheck: typechainCfg.tsNocheck,
environment: 'hardhat',
node16Modules: typechainCfg.node16Modules,
},
}

Expand Down
1 change: 1 addition & 0 deletions packages/hardhat/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export interface TypechainConfig {
tsNocheck: boolean
externalArtifacts?: string[]
dontOverrideCompile: boolean
node16Modules: boolean // defaults to false
}

export interface TypechainUserConfig extends Partial<TypechainConfig> {}

0 comments on commit da71c45

Please sign in to comment.