π Search Terms
- hoisting
- var declaration
- declaration files
- typeof
- module
π Version & Regression Information
This changed between versions 5.5.0-beta and 5.5.0-dev.20240517
β― Playground Link
https://www.typescriptlang.org/play/?ts=5.5.0-dev.20240517#code/N4KABBYG4IYE5hmAvGARGg3CAviApgB4AOA9nAC5gA2+VARgFxgUCex+pAZotkA
π» Code
{
var a = "";
}
export let b: typeof a;
π Actual behavior
export declare let b: typeof a;
π Expected behavior
d.ts emit of either:
var a: string;
export declare let b: typeof a;
or
export declare let b: string;
Probably it should do the first, then it would be compatible with isolated declarations.
Additional information about the issue
No response
π Search Terms
π Version & Regression Information
This changed between versions 5.5.0-beta and 5.5.0-dev.20240517
β― Playground Link
https://www.typescriptlang.org/play/?ts=5.5.0-dev.20240517#code/N4KABBYG4IYE5hmAvGARGg3CAviApgB4AOA9nAC5gA2+VARgFxgUCex+pAZotkA
π» Code
π Actual behavior
π Expected behavior
d.ts emit of either:
or
Probably it should do the first, then it would be compatible with isolated declarations.
Additional information about the issue
No response