Skip to content

Commit 5ae26e1

Browse files
Moved function used in declaration emitter to the declaration emitter to break dependency loop.
1 parent d5203b9 commit 5ae26e1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/compiler/declarationEmitter.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ module ts {
3737
return diagnostics;
3838
}
3939

40+
export function isExternalModuleOrDeclarationFile(sourceFile: SourceFile) {
41+
return isExternalModule(sourceFile) || isDeclarationFile(sourceFile);
42+
}
43+
4044
function emitDeclarations(host: EmitHost, resolver: EmitResolver, diagnostics: Diagnostic[], jsFilePath: string, root?: SourceFile): DeclarationEmit {
4145
let newLine = host.getNewLine();
4246
let compilerOptions = host.getCompilerOptions();

src/compiler/emitter.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33

44
/* @internal */
55
module ts {
6-
export function isExternalModuleOrDeclarationFile(sourceFile: SourceFile) {
7-
return isExternalModule(sourceFile) || isDeclarationFile(sourceFile);
8-
}
9-
106
// Flags enum to track count of temp variables and a few dedicated names
117
const enum TempFlags {
128
Auto = 0x00000000, // No preferred name

0 commit comments

Comments
 (0)