microsoft / microsoft/TypeScript
Extra slashes allowed in import paths
Open
Nobody has claimed this yet.
Bug
Domain: Module Resolution
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
TypeScript Version: 3.6.0-dev.20190628
Search Terms:
- import
- require
- slash / separator
Code
Create an import that uses multiple / instead of a single one:
import { abc } from ".///////folder///////y";
console.log(abc);
Expected behavior:
An error is produced. This is not valid a valid import in many module loaders
Actual behavior:
No error
Playground Link:
Related Issues:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the supplied import example with TypeScript 3.6.0-dev.20190628 and trace the module-resolution entry point that accepts the repeated slashes. Done means the compiler reports an error for the invalid import path while preserving valid single-slash imports.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100