Skip to content

Paths for module resolutions have ambiguous behaviour #21636

Closed

Description

TypeScript Version: 2.7.1

Search Terms:
paths
module resolution

Code

{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@speedy/*/testing": ["src/*/dist"] 
      // the above is resolved to src/package-1/testing/dist
    }
  }
}

Expected behavior:
That the * in the resolved path matches returns only the matched part. Ex: When having the following module @speedy/package-1/testing, the path is picked up by @speedy/*/testing => @speedy/package-1/testing and thus in the resolved part it should becomesrc/*/dist => src/package-1/dist

Actual behavior:
The resolutions seems to be taking the *and the trailing part. Taking the same example as abovesrc/*/dist => src/package-1/testing/dist.

I'd expect that the /testing after the star is omitted, the same as the current behavior for anything preceding the star which in fact is omitted.

Activity

  1. added 2 commits that reference this issue on Feb 5, 2018
    3a66b8e
    18847f9
  2. ghost closed this as completedin #21647on Feb 7, 2018
  3. ghost added a commit that references this issue on Feb 7, 2018
    3893ed4
  4. added
    Bug
    Fixed
    on Feb 7, 2018
  5. locked and limited conversation to collaborators on Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugFixed

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions