Merge pull request #7396 from mattmccutchen/issue7359

Expose ts.isExternalModule as public API.
This commit is contained in:
Daniel Rosenwasser
2016-03-07 10:15:06 -08:00
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;
}