Skip to content

Commit 01c329c

Browse files
Merge pull request microsoft#7396 from mattmccutchen/issue7359
Expose ts.isExternalModule as public API.
2 parents a535460 + 4917220 commit 01c329c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/compiler/parser.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,10 @@ namespace ts {
407407
return result;
408408
}
409409

410+
export function isExternalModule(file: SourceFile): boolean {
411+
return file.externalModuleIndicator !== undefined;
412+
}
413+
410414
// Produces a new SourceFile for the 'newText' provided. The 'textChangeRange' parameter
411415
// indicates what changed between the 'text' that this SourceFile has and the 'newText'.
412416
// The SourceFile will be created with the compiler attempting to reuse as many nodes from

src/compiler/utilities.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,10 +407,6 @@ namespace ts {
407407
return createTextSpanFromBounds(pos, errorNode.end);
408408
}
409409

410-
export function isExternalModule(file: SourceFile): boolean {
411-
return file.externalModuleIndicator !== undefined;
412-
}
413-
414410
export function isExternalOrCommonJsModule(file: SourceFile): boolean {
415411
return (file.externalModuleIndicator || file.commonJsModuleIndicator) !== undefined;
416412
}

0 commit comments

Comments
 (0)