You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In TypeScript files, whenever a type from a different module is exclusively used in satsifies type assertions, the organize-imports CLI strips the type from the import, resulting in the file having compilation errors.
I have noticed this issue recently in projects.
In TypeScript files, whenever a type from a different module is exclusively used in
satsifies
type assertions, theorganize-imports
CLI strips the type from the import, resulting in the file having compilation errors.Example
types.ts
main.ts
When running
organize-imports
, I would expectmain.ts
to remain the same, however the output ends up being:Which is a compile-time error because of the missing type identifier.
Workaround
I do have a workaround for now, by referencing the type in a type alias:
The text was updated successfully, but these errors were encountered: