Skip to content

Commit

Permalink
Renamed API
Browse files Browse the repository at this point in the history
  • Loading branch information
billti committed Jun 30, 2016
1 parent 5a45c44 commit d8047b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/compiler/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1383,7 +1383,7 @@ namespace ts {
getSourceFile: program.getSourceFile,
getSourceFileByPath: program.getSourceFileByPath,
getSourceFiles: program.getSourceFiles,
isSourceFileFromNodeModules: (file: SourceFile) => !!lookUp(sourceFilesFoundSearchingNodeModules, file.path),
isSourceFileFromExternalLibrary: (file: SourceFile) => !!lookUp(sourceFilesFoundSearchingNodeModules, file.path),
writeFile: writeFileCallback || (
(fileName, data, writeByteOrderMark, onError, sourceFiles) => host.writeFile(fileName, data, writeByteOrderMark, onError, sourceFiles)),
isEmitBlocked,
Expand Down
6 changes: 3 additions & 3 deletions src/compiler/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace ts {
getSourceFiles(): SourceFile[];

/* @internal */
isSourceFileFromNodeModules(file: SourceFile): boolean;
isSourceFileFromExternalLibrary(file: SourceFile): boolean;

getCommonSourceDirectory(): string;
getCanonicalFileName(fileName: string): string;
Expand Down Expand Up @@ -2279,7 +2279,7 @@ namespace ts {
const sourceFiles = targetSourceFile === undefined ? host.getSourceFiles() : [targetSourceFile];
for (const sourceFile of sourceFiles) {
// Don't emit if source file is a declaration file, or was located under node_modules
if (!isDeclarationFile(sourceFile) && !host.isSourceFileFromNodeModules(sourceFile)) {
if (!isDeclarationFile(sourceFile) && !host.isSourceFileFromExternalLibrary(sourceFile)) {
onSingleFileEmit(host, sourceFile);
}
}
Expand Down Expand Up @@ -2315,7 +2315,7 @@ namespace ts {
// --module or --target es6 specified. Files included by searching under node_modules are also not emitted.
const bundledSources = filter(host.getSourceFiles(),
sourceFile => !isDeclarationFile(sourceFile) &&
!host.isSourceFileFromNodeModules(sourceFile) &&
!host.isSourceFileFromExternalLibrary(sourceFile) &&
(!isExternalModule(sourceFile) ||
!!getEmitModuleKind(options)));
if (bundledSources.length) {
Expand Down

0 comments on commit d8047b6

Please sign in to comment.