From 715c42c0bfe699d822a7e9ea18751d35aac3235d Mon Sep 17 00:00:00 2001 From: James Zhan Date: Thu, 24 Oct 2024 18:35:35 +1100 Subject: [PATCH] fix(bindings/node): Add `VisitTsPropertySignature` (#9670) **Description:** As per PR #8955 > TsPropertySignature can not have params, type params, or an initializer. This PR cleans up these fields from ts definition and visitor --- packages/core/src/Visitor.ts | 1 - packages/types/index.ts | 4 ---- 2 files changed, 5 deletions(-) diff --git a/packages/core/src/Visitor.ts b/packages/core/src/Visitor.ts index 14173cfdd35..bfed5e770cf 100644 --- a/packages/core/src/Visitor.ts +++ b/packages/core/src/Visitor.ts @@ -797,7 +797,6 @@ export class Visitor { return n; } visitTsPropertySignature(n: TsPropertySignature): TsPropertySignature { - n.params = this.visitTsFnParameters(n.params); n.typeAnnotation = this.visitTsTypeAnnotation(n.typeAnnotation); return n; } diff --git a/packages/types/index.ts b/packages/types/index.ts index aab5182cdbe..2c5b3757c21 100644 --- a/packages/types/index.ts +++ b/packages/types/index.ts @@ -2426,11 +2426,7 @@ export interface TsPropertySignature extends Node, HasSpan { computed: boolean; optional: boolean; - init?: Expression; - params: TsFnParameter[]; - typeAnnotation?: TsTypeAnnotation; - typeParams?: TsTypeParameterDeclaration; } export interface TsGetterSignature extends Node, HasSpan {