Expose ts.isExternalModule as public API.

Fixes #7359
This commit is contained in:
Matt McCutchen
2016-03-04 18:45:42 -05:00
parent 0f6dbd0250
commit 49172207bf
2 changed files with 4 additions and 4 deletions

View File

@@ -407,6 +407,10 @@ namespace ts {
return result;
}
export function isExternalModule(file: SourceFile): boolean {
return file.externalModuleIndicator !== undefined;
}
// Produces a new SourceFile for the 'newText' provided. The 'textChangeRange' parameter
// indicates what changed between the 'text' that this SourceFile has and the 'newText'.
// The SourceFile will be created with the compiler attempting to reuse as many nodes from

View File

@@ -407,10 +407,6 @@ namespace ts {
return createTextSpanFromBounds(pos, errorNode.end);
}
export function isExternalModule(file: SourceFile): boolean {
return file.externalModuleIndicator !== undefined;
}
export function isExternalOrCommonJsModule(file: SourceFile): boolean {
return (file.externalModuleIndicator || file.commonJsModuleIndicator) !== undefined;
}