From 3cee889ff68c565cfb6bdae0ebc11ba6c9a6f3d8 Mon Sep 17 00:00:00 2001 From: tsjs-language-eng Date: Mon, 13 Nov 2023 17:37:16 -0800 Subject: [PATCH] Add legacy namespace info for tombstone summaries PiperOrigin-RevId: 582136634 --- src/summary.ts | 1 + src/ts_migration_exports_shim.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/summary.ts b/src/summary.ts index ffbff10fb..9f2623345 100644 --- a/src/summary.ts +++ b/src/summary.ts @@ -54,6 +54,7 @@ export class FileSummary { modName: string|undefined; autochunk = false; enhanceable = false; + legacyNamespace = false; moduleType = ModuleType.UNKNOWN; private stringify(symbol: Symbol): string { diff --git a/src/ts_migration_exports_shim.ts b/src/ts_migration_exports_shim.ts index ac715764b..0136ea45e 100644 --- a/src/ts_migration_exports_shim.ts +++ b/src/ts_migration_exports_shim.ts @@ -457,6 +457,9 @@ class Generator { fileSummary.addStrongRequire({type: Type.CLOSURE, name: 'goog'}); fileSummary.addStrongRequire( {type: Type.CLOSURE, name: this.srcIds.googModuleId}); + if (maybeDeclareLegacyNameCall) { + fileSummary.legacyNamespace = true; + } fileSummary.autochunk = isAutoChunk; fileSummary.moduleType = ModuleType.GOOG_MODULE;