Skip to content

Commit 5c32547

Browse files
committed
fix: add proper type annotations to baseConfig objects
1 parent d2a1df2 commit 5c32547

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

graphql/codegen/src/core/generate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ export async function generateMulti(
639639

640640
try {
641641
for (const name of names) {
642-
const baseConfig = {
642+
const baseConfig: GraphQLSDKConfigTarget = {
643643
...configs[name],
644644
...(cliOverrides ?? {}),
645645
};

sdk/constructive-react/scripts/generate-react.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
generateMulti,
33
expandSchemaDirToMultiTarget,
44
} from '@constructive-io/graphql-codegen';
5+
import type { GraphQLSDKConfigTarget } from '@constructive-io/graphql-codegen';
56

67
const SCHEMA_DIR = '../constructive-sdk/schemas';
78

@@ -11,7 +12,7 @@ async function main() {
1112
console.log('Generating React SDK from schema files...');
1213
console.log(`Schema directory: ${SCHEMA_DIR}`);
1314

14-
const baseConfig = {
15+
const baseConfig: GraphQLSDKConfigTarget = {
1516
schemaDir: SCHEMA_DIR,
1617
output: './src',
1718
orm: true,

sdk/constructive-sdk/scripts/generate-sdk.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
generateMulti,
33
expandSchemaDirToMultiTarget,
44
} from '@constructive-io/graphql-codegen';
5+
import type { GraphQLSDKConfigTarget } from '@constructive-io/graphql-codegen';
56

67
const SCHEMA_DIR = '../constructive-sdk/schemas';
78

@@ -11,7 +12,7 @@ async function main() {
1112
console.log('Generating SDK from schema files...');
1213
console.log(`Schema directory: ${SCHEMA_DIR}`);
1314

14-
const baseConfig = {
15+
const baseConfig: GraphQLSDKConfigTarget = {
1516
schemaDir: SCHEMA_DIR,
1617
output: './src',
1718
orm: true,

0 commit comments

Comments
 (0)