From e6368c9e629140f832a18c0bfeb17fb671d2e6f6 Mon Sep 17 00:00:00 2001 From: sher Date: Mon, 25 Mar 2024 22:27:41 +0900 Subject: [PATCH] added ts-ignore to import statements --- src/Kiota.Builder/Writers/TypeScript/CodeUsingWriter.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Kiota.Builder/Writers/TypeScript/CodeUsingWriter.cs b/src/Kiota.Builder/Writers/TypeScript/CodeUsingWriter.cs index f205f4af2f..7fdbfd4ca0 100644 --- a/src/Kiota.Builder/Writers/TypeScript/CodeUsingWriter.cs +++ b/src/Kiota.Builder/Writers/TypeScript/CodeUsingWriter.cs @@ -26,7 +26,10 @@ public void WriteCodeElement(IEnumerable 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(); }