From 6a7d2c0a3eee39be020f46f3dd81639f51dc4377 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 8 Nov 2021 07:10:36 +0000 Subject: [PATCH] Restore redirect accessors. --- src/compiler/program.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 12fbb067ddc..57fa55bfb49 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -2592,6 +2592,10 @@ namespace ts { redirect.redirectInfo = { redirectTarget, unredirected }; sourceFilesFoundSearchingNodeModules.set(path, currentNodeModulesDepth > 0); Object.defineProperties(redirect, { + id: { + get(this: SourceFile) { return this.redirectInfo!.redirectTarget.id; }, + set(this: SourceFile, value: SourceFile["id"]) { this.redirectInfo!.redirectTarget.id = value; }, + }, symbol: { get(this: SourceFile) { return this.redirectInfo!.redirectTarget.symbol; }, set(this: SourceFile, value: SourceFile["symbol"]) { this.redirectInfo!.redirectTarget.symbol = value; },