Hoisted vars in blocks at module scope generate in invalid d.ts
files when referenced using typeof
#58557
Labels
Bug
A bug in TypeScript
Domain: Declaration Emit
The issue relates to the emission of d.ts files
Recent Regression
This is a new regression just found in the last major/minor version of TypeScript.
π 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
The text was updated successfully, but these errors were encountered: