Skip to content

Commit

Permalink
fix: type companion global imports
Browse files Browse the repository at this point in the history
  • Loading branch information
0x706b committed Nov 24, 2022
1 parent 484761f commit ad38f2d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions effect/packages/package1/src/global.ts
@@ -0,0 +1,4 @@
/**
* @tsplus global
*/
import { A } from "@tsplus-test/package1/companions-everywhere";
1 change: 1 addition & 0 deletions effect/packages/package1/src/type-companion-global.ts
@@ -0,0 +1 @@
A.get
3 changes: 3 additions & 0 deletions src/compiler/checker.ts
Expand Up @@ -4140,6 +4140,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
);
if (!withoutGlobals) {
getNodeLinks(originalLocation).isTsPlusGlobalIdentifier = true;
if (companionSymbolCache.has(targetSymbol)) {
getSymbolLinks(targetSymbol).isPossibleCompanionReference = true;
}
result = targetSymbol;
}
}
Expand Down

0 comments on commit ad38f2d

Please sign in to comment.