Skip to content

Commit d1586de

Browse files
authoredSep 29, 2022
Fully resolve aliases when checking symbol flags (#50853)
* Resolve aliases past first merge in `resolveName` * WIP * Fix when a namespace merges with an alias that resolves to a type merged with an alias that resolves to a value 😵 * Audit all resolveSymbol and resolveName calls * Fix qualification in re-exporting global cases * Fix infinite loop detection * Update baselines * Just make getAllSymbolFlags default to All
1 parent 45148dd commit d1586de

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1158
-56
lines changed
 

‎src/compiler/checker.ts

+94-36
Large diffs are not rendered by default.

‎tests/baselines/reference/allowImportClausesToMergeWithTypes.errors.txt

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
tests/cases/compiler/index.ts(4,1): error TS2693: 'zzz' only refers to a type, but is being used as a value here.
21
tests/cases/compiler/index.ts(9,10): error TS2749: 'originalZZZ' refers to a value, but is being used as a type here. Did you mean 'typeof originalZZZ'?
32

43

@@ -18,13 +17,11 @@ tests/cases/compiler/index.ts(9,10): error TS2749: 'originalZZZ' refers to a val
1817

1918
export { zzz as default };
2019

21-
==== tests/cases/compiler/index.ts (2 errors) ====
20+
==== tests/cases/compiler/index.ts (1 errors) ====
2221
import zzz from "./a";
2322

2423
const x: zzz = { x: "" };
2524
zzz;
26-
~~~
27-
!!! error TS2693: 'zzz' only refers to a type, but is being used as a value here.
2825

2926
import originalZZZ from "./b";
3027
originalZZZ;

0 commit comments

Comments
 (0)
Please sign in to comment.