@@ -15,36 +15,36 @@ namespace ts {
1515 /**
1616 * Information of the file eg. its version, signature etc
1717 */
18- fileInfos : ReadonlyMap < Path , BuilderState . FileInfo > ;
18+ fileInfos : ReadonlyESMap < Path , BuilderState . FileInfo > ;
1919 /**
2020 * Contains the map of ReferencedSet=Referenced files of the file if module emit is enabled
2121 * Otherwise undefined
2222 * Thus non undefined value indicates, module emit
2323 */
24- readonly referencedMap ?: ReadonlyMap < Path , BuilderState . ReferencedSet > | undefined ;
24+ readonly referencedMap ?: ReadonlyESMap < Path , BuilderState . ReferencedSet > | undefined ;
2525 /**
2626 * Contains the map of exported modules ReferencedSet=exported module files from the file if module emit is enabled
2727 * Otherwise undefined
2828 */
29- readonly exportedModulesMap ?: ReadonlyMap < Path , BuilderState . ReferencedSet > | undefined ;
29+ readonly exportedModulesMap ?: ReadonlyESMap < Path , BuilderState . ReferencedSet > | undefined ;
3030 }
3131
3232 export interface BuilderState {
3333 /**
3434 * Information of the file eg. its version, signature etc
3535 */
36- fileInfos : Map < Path , BuilderState . FileInfo > ;
36+ fileInfos : ESMap < Path , BuilderState . FileInfo > ;
3737 /**
3838 * Contains the map of ReferencedSet=Referenced files of the file if module emit is enabled
3939 * Otherwise undefined
4040 * Thus non undefined value indicates, module emit
4141 */
42- readonly referencedMap : ReadonlyMap < Path , BuilderState . ReferencedSet > | undefined ;
42+ readonly referencedMap : ReadonlyESMap < Path , BuilderState . ReferencedSet > | undefined ;
4343 /**
4444 * Contains the map of exported modules ReferencedSet=exported module files from the file if module emit is enabled
4545 * Otherwise undefined
4646 */
47- readonly exportedModulesMap : Map < Path , BuilderState . ReferencedSet > | undefined ;
47+ readonly exportedModulesMap : ESMap < Path , BuilderState . ReferencedSet > | undefined ;
4848 /**
4949 * Map of files that have already called update signature.
5050 * That means hence forth these files are assumed to have
@@ -83,7 +83,7 @@ namespace ts {
8383 * Exported modules to from declaration emit being computed.
8484 * This can contain false in the affected file path to specify that there are no exported module(types from other modules) for this file
8585 */
86- export type ComputingExportedModulesMap = Map < Path , ReferencedSet | false > ;
86+ export type ComputingExportedModulesMap = ESMap < Path , ReferencedSet | false > ;
8787
8888 /**
8989 * Get the referencedFile from the imported module symbol
@@ -192,7 +192,7 @@ namespace ts {
192192 /**
193193 * Returns true if oldState is reusable, that is the emitKind = module/non module has not changed
194194 */
195- export function canReuseOldState ( newReferencedMap : ReadonlyMap < Path , ReferencedSet > | undefined , oldState : Readonly < ReusableBuilderState > | undefined ) {
195+ export function canReuseOldState ( newReferencedMap : ReadonlyESMap < Path , ReferencedSet > | undefined , oldState : Readonly < ReusableBuilderState > | undefined ) {
196196 return oldState && ! oldState . referencedMap === ! newReferencedMap ;
197197 }
198198
@@ -258,7 +258,7 @@ namespace ts {
258258 /**
259259 * Gets the files affected by the path from the program
260260 */
261- export function getFilesAffectedBy ( state : BuilderState , programOfThisState : Program , path : Path , cancellationToken : CancellationToken | undefined , computeHash : ComputeHash , cacheToUpdateSignature ?: Map < Path , string > , exportedModulesMapCache ?: ComputingExportedModulesMap ) : readonly SourceFile [ ] {
261+ export function getFilesAffectedBy ( state : BuilderState , programOfThisState : Program , path : Path , cancellationToken : CancellationToken | undefined , computeHash : ComputeHash , cacheToUpdateSignature ?: ESMap < Path , string > , exportedModulesMapCache ?: ComputingExportedModulesMap ) : readonly SourceFile [ ] {
262262 // Since the operation could be cancelled, the signatures are always stored in the cache
263263 // They will be committed once it is safe to use them
264264 // eg when calling this api from tsserver, if there is no cancellation of the operation
@@ -285,7 +285,7 @@ namespace ts {
285285 * Updates the signatures from the cache into state's fileinfo signatures
286286 * This should be called whenever it is safe to commit the state of the builder
287287 */
288- export function updateSignaturesFromCache ( state : BuilderState , signatureCache : Map < Path , string > ) {
288+ export function updateSignaturesFromCache ( state : BuilderState , signatureCache : ESMap < Path , string > ) {
289289 signatureCache . forEach ( ( signature , path ) => updateSignatureOfFile ( state , signature , path ) ) ;
290290 }
291291
@@ -297,7 +297,7 @@ namespace ts {
297297 /**
298298 * Returns if the shape of the signature has changed since last emit
299299 */
300- export function updateShapeSignature ( state : Readonly < BuilderState > , programOfThisState : Program , sourceFile : SourceFile , cacheToUpdateSignature : Map < Path , string > , cancellationToken : CancellationToken | undefined , computeHash : ComputeHash , exportedModulesMapCache ?: ComputingExportedModulesMap ) {
300+ export function updateShapeSignature ( state : Readonly < BuilderState > , programOfThisState : Program , sourceFile : SourceFile , cacheToUpdateSignature : ESMap < Path , string > , cancellationToken : CancellationToken | undefined , computeHash : ComputeHash , exportedModulesMapCache ?: ComputingExportedModulesMap ) {
301301 Debug . assert ( ! ! sourceFile ) ;
302302 Debug . assert ( ! exportedModulesMapCache || ! ! state . exportedModulesMap , "Compute visible to outside map only if visibleToOutsideReferencedMap present in the state" ) ;
303303
@@ -518,7 +518,7 @@ namespace ts {
518518 /**
519519 * When program emits modular code, gets the files affected by the sourceFile whose shape has changed
520520 */
521- function getFilesAffectedByUpdatedShapeWhenModuleEmit ( state : BuilderState , programOfThisState : Program , sourceFileWithUpdatedShape : SourceFile , cacheToUpdateSignature : Map < Path , string > , cancellationToken : CancellationToken | undefined , computeHash : ComputeHash | undefined , exportedModulesMapCache : ComputingExportedModulesMap | undefined ) {
521+ function getFilesAffectedByUpdatedShapeWhenModuleEmit ( state : BuilderState , programOfThisState : Program , sourceFileWithUpdatedShape : SourceFile , cacheToUpdateSignature : ESMap < Path , string > , cancellationToken : CancellationToken | undefined , computeHash : ComputeHash | undefined , exportedModulesMapCache : ComputingExportedModulesMap | undefined ) {
522522 if ( isFileAffectingGlobalScope ( sourceFileWithUpdatedShape ) ) {
523523 return getAllFilesExcludingDefaultLibraryFile ( state , programOfThisState , sourceFileWithUpdatedShape ) ;
524524 }
0 commit comments