Skip to content

Commit ad38f2d

Browse files
committed
fix: type companion global imports
1 parent 484761f commit ad38f2d

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/**
2+
* @tsplus global
3+
*/
4+
import { A } from "@tsplus-test/package1/companions-everywhere";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
A.get

src/compiler/checker.ts

+3
Original file line numberDiff line numberDiff line change
@@ -4140,6 +4140,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
41404140
);
41414141
if (!withoutGlobals) {
41424142
getNodeLinks(originalLocation).isTsPlusGlobalIdentifier = true;
4143+
if (companionSymbolCache.has(targetSymbol)) {
4144+
getSymbolLinks(targetSymbol).isPossibleCompanionReference = true;
4145+
}
41434146
result = targetSymbol;
41444147
}
41454148
}

0 commit comments

Comments
 (0)