Skip to content

Commit

Permalink
fix(types): fix typo in the Type name, RegisteredImport
Browse files Browse the repository at this point in the history
BREAKING CHANGE: has to import another type of needed.
  • Loading branch information
RyuuGan committed Aug 29, 2021
1 parent 7061943 commit 18481aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/fileAnalyzer.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions lib/importRegistry.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export interface RegistredImport {
export interface RegisteredImport {
file: string;
name: string;
as?: string | null;
Expand All @@ -7,7 +7,7 @@ export interface RegistredImport {

export class ImportsRegistry {
registeredImportStatements: string[] = [];
registeredImports: RegistredImport[] = [];
registeredImports: RegisteredImport[] = [];

isImportProcessed(importStatement?: string): boolean {
if (!importStatement) {
Expand All @@ -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);
}

Expand Down

0 comments on commit 18481aa

Please sign in to comment.