Skip to content

Commit bc8d45e

Browse files
author
andy-ms
committed
Code review
1 parent 31637fa commit bc8d45e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/compiler/core.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,9 @@ namespace ts {
394394
return result;
395395
}
396396

397-
export function mapIter<T, U>(iter: Iterator<T>, mapFn: (x: T) => U): Iterator<U> {
397+
export function mapIterator<T, U>(iter: Iterator<T>, mapFn: (x: T) => U): Iterator<U> {
398398
return { next };
399-
function next(): { value: U, done: false } | { value: never, done: true } {
399+
function next(): { value: U, done: false } | { value: never, done: true } {
400400
const iterRes = iter.next();
401401
return iterRes.done ? iterRes : { value: mapFn(iterRes.value), done: false };
402402
}
@@ -942,7 +942,7 @@ namespace ts {
942942
}
943943
}
944944

945-
export function arrayIter<T>(array: ReadonlyArray<T>): Iterator<T> {
945+
export function arrayIterator<T>(array: ReadonlyArray<T>): Iterator<T> {
946946
let i = 0;
947947
return { next: () => {
948948
if (i === array.length) {

src/services/codefixes/importFixes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ namespace ts.codefix {
316316
}
317317

318318
export function getModuleSpecifierForNewImport(sourceFile: SourceFile, moduleSymbols: ReadonlyArray<Symbol>, options: CompilerOptions, getCanonicalFileName: (file: string) => string, host: LanguageServiceHost): string | undefined {
319-
const choices = mapIter(arrayIter(moduleSymbols), moduleSymbol => {
319+
const choices = mapIterator(arrayIterator(moduleSymbols), moduleSymbol => {
320320
const moduleFileName = moduleSymbol.valueDeclaration.getSourceFile().fileName;
321321
const sourceDirectory = getDirectoryPath(sourceFile.fileName);
322322

0 commit comments

Comments
 (0)