Skip to content

Commit

Permalink
remove unused find and remove methods from ImportManager.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
taefi committed Aug 7, 2024
1 parent e43bb37 commit 31b4d77
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions packages/ts/generator-utils/src/dependencies/ImportManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,6 @@ export class NamedImportManager extends StatementRecordManager<ImportDeclaration
}
}

find(predicate: (path: string, specifier: string) => boolean): [string, string, boolean, Identifier] | undefined {
for (const [path, specifiers] of this.#map) {
for (const [specifier, { id, isType }] of specifiers) {
if (predicate(path, specifier)) {
return [path, specifier, isType, id];
}
}
}
return undefined;
}

override clear(): void {
this.#map.clear();
}
Expand Down Expand Up @@ -116,21 +105,6 @@ export class NamespaceImportManager extends StatementRecordManager<ImportDeclara
return id;
}

remove(path: string): void {
if (this.#map.has(path)) {
this.#map.delete(path);
}
}

find(predicate: (id: Identifier) => boolean): string | undefined {
for (const [path, id] of this.#map) {
if (predicate(id)) {
return path;
}
}
return undefined;
}

override clear(): void {
this.#map.clear();
}
Expand Down

0 comments on commit 31b4d77

Please sign in to comment.