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
{{ message }}
Repository navigation
Auto-imports don’t work in content-mappers without existing import #64119
Automatic imports work, if the statement to insert it to is already present. However, if the import statement isn’t present yet, then TypeScript won’t generate the statement.
This works:
This does not:
🙂 Expected behavior
Automatic imports always work.
Additional information about the issue
I tried to make this work by pushing an empty verbatim mapping to the start of the virtual content, like below. The virtual content may start with '// @ts-check\n'. In this case, the mapping is placed after that comment.
changed the title [-]Auto-imports don’t work in content-mappers if[/-][+]Auto-imports don’t work in content-mappers without existing import[/+]on Sep 1, 2026
Activity
[-]Auto-imports don’t work in content-mappers if[/-][+]Auto-imports don’t work in content-mappers without existing import[/+]Native TypeScript 7 support for .tsrx through a content mapper (#41) (#…