Skip to content

Commit

Permalink
fix: add types.d.ts for changetype ts checks
Browse files Browse the repository at this point in the history
  • Loading branch information
antho31 committed Nov 26, 2024
1 parent 5b37bbe commit 6474e9d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/subgraph/scripts/abi_copy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function publishContract(
console.log(e)
}

let graphConfigObject = JSON.parse(graphConfig)
const graphConfigObject = JSON.parse(graphConfig)
if (!(networkName in graphConfigObject)) {
graphConfigObject[networkName] = {}
}
Expand Down
14 changes: 7 additions & 7 deletions packages/subgraph/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"extends": "@graphprotocol/graph-ts/types/tsconfig.base.json",
"compilerOptions": {
/* Base Options */
/* Base Options: */
"esModuleInterop": true,
"skipLibCheck": true,
"target": "es2022",
"allowJs": true,
"resolveJsonModule": true,
"moduleDetection": "force",
"isolatedModules": true,
"strict": true,
"noUncheckedIndexedAccess": true,
"sourceMap": true,
"declaration": true,
"moduleResolution": "node", // Corrige le chargement des modules ESM
"module": "ES2022",
"noLib": false,
"moduleResolution": "Bundler",
"module": "ESNext",
"noEmit": true,
"lib": ["es2022"],
"types": ["node", "assembly"], // Inclure Node.js et Graph types
"noEmit": true // Empêche l'émission de fichiers JavaScript
"typeRoots": ["./node_modules/@types", "./types"],
"types": ["node"]
}
}
1 change: 1 addition & 0 deletions packages/subgraph/types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare function changetype<T>(value: any): T

0 comments on commit 6474e9d

Please sign in to comment.