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";