From f4f275719adaa334ca4262e7d432462f33168d2f Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Tue, 6 Aug 2024 21:12:28 +0200 Subject: [PATCH] Update Method.ts --- packages/nitrogen/src/syntax/Method.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/nitrogen/src/syntax/Method.ts b/packages/nitrogen/src/syntax/Method.ts index 936da7529..f11de61f8 100644 --- a/packages/nitrogen/src/syntax/Method.ts +++ b/packages/nitrogen/src/syntax/Method.ts @@ -56,12 +56,12 @@ export class Method implements CodeNode { this.parameters = parameters } else { // constructor(...) #2 - const [prop] = args - this.name = prop.getSymbolOrThrow().getEscapedName() - const returnType = prop.getReturnType() + const [method] = args + this.name = method.getSymbolOrThrow().getEscapedName() + const returnType = method.getReturnType() const isOptional = returnType.isNullable() this.returnType = createType(returnType, isOptional) - this.parameters = prop.getParameters().map((p) => new Parameter(p)) + this.parameters = method.getParameters().map((p) => new Parameter(p)) } }