Skip to content

Commit f35885d

Browse files
committed
scaffold: Add tsconfig.json extended from graph-ts
1 parent c1075d2 commit f35885d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/scaffold.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,14 @@ const generateSchema = ({ abi, indexEvents }) => {
152152
)
153153
}
154154

155+
const tsConfig = prettier.format(
156+
JSON.stringify({
157+
extends: '@graphprotocol/graph-ts/types/tsconfig.base.json',
158+
include: ['src'],
159+
}),
160+
{ parser: 'json' },
161+
)
162+
155163
// Mapping
156164

157165
const generateTupleFieldAssignments = ({ keyPath, index, component }) => {
@@ -310,6 +318,7 @@ const generateScaffold = async (
310318
'package.json': packageJson,
311319
'subgraph.yaml': manifest,
312320
'schema.graphql': schema,
321+
'tsconfig.json': tsConfig,
313322
src: { 'mapping.ts': mapping },
314323
abis: {
315324
[`${contractName}.json`]: prettier.format(JSON.stringify(abi.data), {

0 commit comments

Comments
 (0)