diff --git a/src/compile/inference/imports.ts b/src/compile/inference/imports.ts index 27dda5f2..3f23f551 100644 --- a/src/compile/inference/imports.ts +++ b/src/compile/inference/imports.ts @@ -98,12 +98,7 @@ export function findAllFiles( resolvers: ImportResolver[] ): void { // Queue of source unit names to process - const queue: string[] = []; - - for (const fileName of files.keys()) { - queue.push(fileName); - } - + const queue: string[] = [...files.keys()]; const visited = new Set(); while (queue.length > 0) {