-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Open
Description
π Search Terms
TS2877
π Version & Regression Information
This changed between versions 5.6 and 5.7 (best guess; 5.7 introduced rewriteRelativeImportExtensions).
β― Playground Link
π» Code
// Imports like these cause TS2877,
// when in fact there's nothing wrong about them.
import "#alice.ts";π Actual behavior
error TS2877: This import uses a '.ts' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path.π Expected behavior
Don't error.
Additional information about the issue
Specifiers aren't paths. Especially subpath imports and exports allow for almost arbitrary string rewriting. The compiler is blatantly wrong about this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels