Invalid quick fix for class that's exported as a variable with isolatedDeclarations
#61644
Labels
Milestone
isolatedDeclarations
#61644
π Search Terms
isolatedDeclarations
, quick fix, classπ Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?isolatedDeclarations=true#code/JYWwDg9gTgLgBAbzgNQgGwK4gKZwL5wBmUEIcA5DiIQM7kDcAUI9gB6SxwDGEAdjfEIQIcALxxe2AO4p0WbAAoAlEyA
π» Code
π Actual behavior
The "Add annotation of type Volume" quick fix produces broken code:
The "Add satisfies and an inline type assertion with Volume" quick fix produces broken code:
In both cases the quick fix adds another import which creates a TS error due to the duplicate name. If you remove the added import then there is a different error because
Volume
in this instance is actually a variable that aliases the class declaration -- so it cannot be used as a type.π Expected behavior
The quick fix should produce working code.
Additional information about the issue
This might be a unique edge case due to the horrid types in
memfs
-- IDK why they re-export the class via a variable -- that's seriously cooked.The text was updated successfully, but these errors were encountered: