From 61580150ea2a72d451c29f0f764c440785505a4f Mon Sep 17 00:00:00 2001 From: Wonseo-C <1202won@gmail.com> Date: Tue, 9 Aug 2022 09:49:29 +0900 Subject: [PATCH] Change getTragetType function --- org.lflang/src/org/lflang/generator/TargetTypes.java | 2 +- .../src/org/lflang/generator/ts/TSParameterPreambleGenerator.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/org.lflang/src/org/lflang/generator/TargetTypes.java b/org.lflang/src/org/lflang/generator/TargetTypes.java index c667d45a20..8e72c2a3f0 100644 --- a/org.lflang/src/org/lflang/generator/TargetTypes.java +++ b/org.lflang/src/org/lflang/generator/TargetTypes.java @@ -163,7 +163,7 @@ default String getTargetType(InferredType type) { } else if (type.isVariableSizeList) { return getTargetVariableSizeListType(type.baseType()); } - return type.toText(); + return type.toOriginalText(); } /** diff --git a/org.lflang/src/org/lflang/generator/ts/TSParameterPreambleGenerator.kt b/org.lflang/src/org/lflang/generator/ts/TSParameterPreambleGenerator.kt index 5b1e032331..02380fa9fd 100644 --- a/org.lflang/src/org/lflang/generator/ts/TSParameterPreambleGenerator.kt +++ b/org.lflang/src/org/lflang/generator/ts/TSParameterPreambleGenerator.kt @@ -126,7 +126,7 @@ class TSParameterPreambleGenerator( var customArgType: String? = null var customTypeLabel: String? = null - val paramType = parameter.type.id + val paramType = getTargetType(parameter) if (paramType == "string") { mainParameters.add(parameter) customArgType = "String";