-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Open
Labels
APIRelates to the public API for TypeScriptRelates to the public API for TypeScriptBugA bug in TypeScriptA bug in TypeScript
Milestone
Description
Baseline test:
// @Filename: /a.ts
class A {}
export type B = A;
// @Filename: /b.ts
import { B as C } from './a';
Types baseline:
=== /a.ts ===
class A {}
>A : A
export type B = A;
>B : A
=== /b.ts ===
import { B as C } from './a';
>B : any
>C : any
Note that during the normal course of checking, everything works fine, because we don’t ask for the type of the import specifier. If someone were to use C
, we’d ask for the type of the type reference, and we’d start by resolving the alias all the way to its origin. So only when the baseline writer specifically asks for the type at B
and C
do we hit this bug. So, it’s fairly unimportant. I investigated this and an opening the issue to document that some any
readouts in #35200 are exhibiting some existing poor behavior, and fixing it there would be out of scope.
Metadata
Metadata
Assignees
Labels
APIRelates to the public API for TypeScriptRelates to the public API for TypeScriptBugA bug in TypeScriptA bug in TypeScript