1
- import * as ts from "./_namespaces/ts" ;
2
- import { performance } from "./_namespaces/ts" ;
3
1
import { OutputFile } from "./builderStatePublic" ;
4
2
import { getNodeId } from "./checker" ;
5
3
import {
6
4
arrayToMap , cast , clone , contains , createGetCanonicalFileName , createMultiMap , emptyArray , filter , findIndex ,
7
5
forEach , GetCanonicalFileName , isArray , last , lastOrUndefined , length , memoize , notImplemented , returnFalse ,
8
6
returnUndefined , singleOrUndefined , some , stableSort , stringContains ,
9
7
} from "./core" ;
10
- import { Comparison , Map , Set } from "./corePublic" ;
8
+ import { Comparison , Map , Set , version } from "./corePublic" ;
11
9
import { Debug } from "./debug" ;
12
10
import { compareEmitHelpers } from "./factory/emitHelpers" ;
13
11
import {
@@ -32,6 +30,7 @@ import {
32
30
getRelativePathFromDirectory , getRelativePathToDirectoryOrUrl , getRootLength , normalizePath , normalizeSlashes ,
33
31
resolvePath ,
34
32
} from "./path" ;
33
+ import * as performance from "./performance" ;
35
34
import { computeCommonSourceDirectoryOfFilenames , createPrependNodes } from "./program" ;
36
35
import {
37
36
computeLineStarts , forEachLeadingCommentRange , forEachTrailingCommentRange , getLeadingCommentRanges ,
@@ -93,12 +92,12 @@ import {
93
92
getLinesBetweenRangeEndAndRangeStart , getLiteralText , GetLiteralTextFlags , getNewLineCharacter ,
94
93
getOwnEmitOutputFilePath , getSourceFileOfNode , getSourceFilePathInNewDir , getSourceFilesToEmit ,
95
94
getSourceTextOfNodeFromSourceFile , getTrailingSemicolonDeferringWriter , isAccessExpression , isBundleFileTextLike ,
96
- isIncrementalCompilation , isInJsonFile , isJsonSourceFile , isKeyword , isLet , isNodeDescendantOf , isPinnedComment ,
97
- isPrologueDirective , isRecognizedTripleSlashComment , isSourceFileNotJson , isVarConst , makeIdentifierFromModuleName ,
98
- nodeIsSynthesized , outFile , positionIsSynthesized , positionsAreOnSameLine , rangeEndIsOnSameLineAsRangeStart ,
99
- rangeEndPositionsAreOnSameLine , rangeIsOnSingleLine , rangeStartPositionsAreOnSameLine , removeFileExtension ,
100
- setEachParent , setParent , setTextRangePosEnd , setTextRangePosWidth , supportedJSExtensionsFlat , writeCommentRange ,
101
- writeFile ,
95
+ isFileLevelUniqueName as isFileLevelUniqueNameInternal , isIncrementalCompilation , isInJsonFile , isJsonSourceFile ,
96
+ isKeyword , isLet , isNodeDescendantOf , isPinnedComment , isPrologueDirective , isRecognizedTripleSlashComment ,
97
+ isSourceFileNotJson , isVarConst , makeIdentifierFromModuleName , nodeIsSynthesized , outFile , positionIsSynthesized ,
98
+ positionsAreOnSameLine , rangeEndIsOnSameLineAsRangeStart , rangeEndPositionsAreOnSameLine , rangeIsOnSingleLine ,
99
+ rangeStartPositionsAreOnSameLine , removeFileExtension , setEachParent , setParent , setTextRangePosEnd ,
100
+ setTextRangePosWidth , supportedJSExtensionsFlat , writeCommentRange , writeFile ,
102
101
} from "./utilities" ;
103
102
import {
104
103
escapeLeadingUnderscores , getOriginalNode , getParseTreeNode , getTextOfJSDocComment , guessIndentation , idText ,
@@ -472,7 +471,6 @@ export function emitFiles(resolver: EmitResolver, host: EmitHost, targetSourceFi
472
471
emitSkipped = true ;
473
472
return ;
474
473
}
475
- const version = ts . version ; // Extracted into a const so the form is stable between namespace and module
476
474
writeFile ( host , emitterDiagnostics , buildInfoPath , getBuildInfoText ( { bundle, program, version } ) , /*writeByteOrderMark*/ false ) ;
477
475
}
478
476
@@ -5210,7 +5208,7 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
5210
5208
* Returns a value indicating whether a name is unique globally or within the current file.
5211
5209
*/
5212
5210
function isFileLevelUniqueName ( name : string ) {
5213
- return currentSourceFile ? ts . isFileLevelUniqueName ( currentSourceFile , name , hasGlobalName ) : true ;
5211
+ return currentSourceFile ? isFileLevelUniqueNameInternal ( currentSourceFile , name , hasGlobalName ) : true ;
5214
5212
}
5215
5213
5216
5214
/**
0 commit comments