From f1be68957c2b1069d6c27541ff07ac5e98df9c35 Mon Sep 17 00:00:00 2001 From: Roman Starkov Date: Wed, 4 Apr 2018 11:18:25 +0100 Subject: [PATCH] Work-around for https://github.com/Microsoft/TypeScript/issues/18159 --- TypeGap/GapApiGenerator.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TypeGap/GapApiGenerator.cs b/TypeGap/GapApiGenerator.cs index 0c2929d..1727983 100644 --- a/TypeGap/GapApiGenerator.cs +++ b/TypeGap/GapApiGenerator.cs @@ -256,7 +256,7 @@ protected virtual string BuildUrlString(ApiActionDesc action, string template, A part = part.Substring(1); routeParameters.Add(part); - url.Append($"/\" + encodeURIComponent({part}) + \""); + url.Append($"/\" + encodeURIComponent({part} as any) + \""); } foreach (var r in routeParameters) @@ -283,7 +283,7 @@ protected virtual string BuildUrlString(ApiActionDesc action, string template, A if (finalGetParameters.Any()) { url.Append("?"); - url.Append(String.Join("&", finalGetParameters.Select(p => $"{p.ParameterName}=\" + encodeURIComponent({p.ParameterName}) + \""))); + url.Append(String.Join("&", finalGetParameters.Select(p => $"{p.ParameterName}=\" + encodeURIComponent({p.ParameterName} as any) + \""))); } return "\"" + _rewriter(url.ToString().TrimStart('/')) + "\"";