diff --git a/src/lib/import.ts b/src/lib/import.ts index ca8eb08..77bd354 100644 --- a/src/lib/import.ts +++ b/src/lib/import.ts @@ -81,9 +81,11 @@ export function getCodeFixActionByName( function getModulePathsToImport(options: PluginOptions, project: ts.server.Project): string[] { const currentDir = project.getCurrentDirectory(); - return options.paths.flatMap((dirPath) => { + const modulePaths = options.paths.flatMap((dirPath) => { return project.readDirectory(path.resolve(currentDir, dirPath), ['.ts', '.js']); }); + + return [...new Set(modulePaths)]; } function getFileNameWithoutExt(filePath: string): string { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy