diff --git a/packages/extensions/openapi-to-typespec/src/utils/imports.ts b/packages/extensions/openapi-to-typespec/src/utils/imports.ts index a8b7b34d84..1c95a93c74 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/imports.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/imports.ts @@ -7,15 +7,15 @@ export type Imports = { }; export function getMainImports(program: TypespecProgram): Imports { - const modules = new Set(); - const namespaces = new Set(); + const modules: string[] = []; + const namespaces: string[] = []; if (program.serviceInformation.authentication?.some((a) => a.kind === "AadOauth2Auth")) { - modules.add(`import "@azure-tools/typespec-azure-core";`); - namespaces.add("using Azure.Core;"); + modules.push(`import "@azure-tools/typespec-azure-core";`); + namespaces.push("using Azure.Core;"); } return { - modules: [...modules], - namespaces: [...namespaces], + modules, + namespaces, }; }