From 1ecebf242e2dc3b3d82b2357572b693585581f3c Mon Sep 17 00:00:00 2001 From: Arda TANRIKULU Date: Sun, 15 Dec 2024 02:35:28 +0300 Subject: [PATCH] Fix TypeScript --- packages/plugins/typescript/nest/src/visitor.ts | 3 +++ packages/plugins/typescript/type-graphql/src/visitor.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/packages/plugins/typescript/nest/src/visitor.ts b/packages/plugins/typescript/nest/src/visitor.ts index 1bca6aca8..56d3ccc8d 100644 --- a/packages/plugins/typescript/nest/src/visitor.ts +++ b/packages/plugins/typescript/nest/src/visitor.ts @@ -181,8 +181,10 @@ export class NestVisitor< let declarationBlock: DeclarationBlock; if (isGraphQLType) { + // @ts-expect-error - Types have separate declarations of a private property '_config'. declarationBlock = this.typescriptVisitor.getObjectTypeDeclarationBlock(node, originalNode); } else { + // @ts-expect-error - Types have separate declarations of a private property '_config'. declarationBlock = this.getObjectTypeDeclarationBlock(node, originalNode); // Add decorator @@ -220,6 +222,7 @@ export class NestVisitor< return declarationBlock.string; } + // @ts-expect-error - Types have separate declarations of a private property '_config'. getArgumentsObjectDeclarationBlock( node: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, name: string, diff --git a/packages/plugins/typescript/type-graphql/src/visitor.ts b/packages/plugins/typescript/type-graphql/src/visitor.ts index 48199735d..1d7f67620 100644 --- a/packages/plugins/typescript/type-graphql/src/visitor.ts +++ b/packages/plugins/typescript/type-graphql/src/visitor.ts @@ -228,8 +228,10 @@ export class TypeGraphQLVisitor< let declarationBlock: DeclarationBlock; if (isGraphQLType) { + // @ts-expect-error - Types have separate declarations of a private property '_config'. declarationBlock = this.typescriptVisitor.getObjectTypeDeclarationBlock(node, originalNode); } else { + // @ts-expect-error - Types have separate declarations of a private property '_config'. declarationBlock = this.getObjectTypeDeclarationBlock(node, originalNode); // Add type-graphql ObjectType decorator @@ -268,6 +270,7 @@ export class TypeGraphQLVisitor< return declarationBlock.string; } + // @ts-expect-error - Types have separate declarations of a private property '_config'. getArgumentsObjectDeclarationBlock( node: InterfaceTypeDefinitionNode | ObjectTypeDefinitionNode, name: string,