Browse Source

refactor: rename '@types' directory to 'types'

fix: hardhat typescript augmentations
Paul Razvan Berg 4 năm trước cách đây
mục cha
commit
7275d1ac72
3 tập tin đã thay đổi với 6 bổ sung10 xóa
  1. 2 6
      hardhat.config.ts
  2. 1 1
      tsconfig.json
  3. 3 3
      types/augmentations.d.ts

+ 2 - 6
hardhat.config.ts

@@ -70,8 +70,8 @@ const config: HardhatUserConfig = {
   paths: {
     artifacts: "./artifacts",
     cache: "./cache",
-    // coverage: "./coverage",
-    // coverageJson: "./coverage.json",
+    coverage: "./coverage",
+    coverageJson: "./coverage.json",
     sources: "./contracts",
     tests: "./test",
   },
@@ -89,10 +89,6 @@ const config: HardhatUserConfig = {
     outDir: "typechain",
     target: "ethers-v5",
   },
-  spdxLicenseIdentifier: {
-    overwrite: false,
-    runOnCompile: true,
-  },
 };
 
 export default config;

+ 1 - 1
tsconfig.json

@@ -14,7 +14,7 @@
   },
   "exclude": ["node_modules"],
   "include": [
-    "@types/**/*",
+    "types/**/*",
     "artifacts/**/*",
     "artifacts/**/*.json",
     "scripts/**/*",

+ 3 - 3
@types/augmentations.d.ts → types/augmentations.d.ts

@@ -1,9 +1,9 @@
 import { Greeter } from "../typechain/Greeter";
 
 declare module "hardhat/types" {
-  interface ProjectPaths {
-    // coverage: string;
-    // coverageJson: string;
+  interface ProjectPathsUserConfig {
+    coverage: string;
+    coverageJson: string;
   }
 }