Restore redirect accessors.

This commit is contained in:
Daniel Rosenwasser 2021-11-08 07:10:36 +00:00 committed by GitHub
parent 41faf73bfc
commit 6a7d2c0a3e

View file

@ -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; },