mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 01:49:57 -05:00
Merge pull request #7396 from mattmccutchen/issue7359
Expose ts.isExternalModule as public API.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user