Skip to content

Commit

Permalink
Work-around for microsoft/TypeScript#18159
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Starkov authored and Roman Starkov committed Apr 4, 2018
1 parent 193dae4 commit f1be689
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TypeGap/GapApiGenerator.cs
Expand Up @@ -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)
Expand All @@ -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('/')) + "\"";
Expand Down

0 comments on commit f1be689

Please sign in to comment.