Skip to content

Commit

Permalink
added ts-ignore to import statements
Browse files Browse the repository at this point in the history
  • Loading branch information
sher committed Mar 25, 2024
1 parent 39b3cde commit e6368c9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Kiota.Builder/Writers/TypeScript/CodeUsingWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ public void WriteCodeElement(IEnumerable<CodeUsing> usings, CodeNamespace parent
.GroupBy(static x => x.Path)
.OrderBy(static x => x.Key);
foreach (var codeUsing in importSymbolsAndPaths.Where(static x => !string.IsNullOrWhiteSpace(x.Key)))
{
writer.WriteLine("// @ts-ignore");
writer.WriteLine($"import {{ {codeUsing.Select(static x => GetAliasedSymbol(x.Symbol, x.Alias, x.ShouldUseTypeImport)).Distinct().OrderBy(static x => x).Aggregate(static (x, y) => x + ", " + y)} }} from '{codeUsing.Key}';");
}

writer.WriteLine();
}
Expand Down

0 comments on commit e6368c9

Please sign in to comment.