diff --git a/lib/fileAnalyzer.ts b/lib/fileAnalyzer.ts index accfba2..b2440fc 100644 --- a/lib/fileAnalyzer.ts +++ b/lib/fileAnalyzer.ts @@ -1,7 +1,7 @@ import fs from 'fs-extra'; import stripComments from 'strip-json-comments'; import { ExportsAnalyzer, ExportsAnalyzerResult } from './exportsAnalyzer'; -import { RegistredImport } from './importRegistry'; +import { RegisteredImport } from './importRegistry'; import { ImportsAnalyzer, ImportsAnalyzerResult } from './importsAnalyzer'; import { ExportType } from './types'; @@ -15,7 +15,7 @@ export class FileAnalyzer { analyzedFile: FileAnalyzerResult, e: ExportsAnalyzerResult, newName: string | null, - globalRenames: RegistredImport[], + globalRenames: RegisteredImport[], ): string { if (e.type === ExportType.comment) { return e.body; diff --git a/lib/importRegistry.ts b/lib/importRegistry.ts index ba3c939..6a5b854 100644 --- a/lib/importRegistry.ts +++ b/lib/importRegistry.ts @@ -1,4 +1,4 @@ -export interface RegistredImport { +export interface RegisteredImport { file: string; name: string; as?: string | null; @@ -7,7 +7,7 @@ export interface RegistredImport { export class ImportsRegistry { registeredImportStatements: string[] = []; - registeredImports: RegistredImport[] = []; + registeredImports: RegisteredImport[] = []; isImportProcessed(importStatement?: string): boolean { if (!importStatement) { @@ -20,11 +20,11 @@ export class ImportsRegistry { this.registeredImportStatements.push(importStatement); } - registerImport(i: RegistredImport): void { + registerImport(i: RegisteredImport): void { this.registeredImports.push(i); } - getGlobalImports(): RegistredImport[] { + getGlobalImports(): RegisteredImport[] { return this.registeredImports.filter((i) => i.globalRename); }