Skip to content

Path completions for subdirectories not returned when using compilerOptions.path #21589

Closed
@mjbvz

Description

@mjbvz

TypeScript Version: 2.7.1

Search Terms:

  • Path intellisense
  • Path completions

Code

$ git clone https://github.com/mjbvz/ts-issue-21582
  1. For a js project:
jsconfig.json
src/
  index.js
  keeper.js
  animals/
      cat.js

With jsconfig.json:

{
	"compilerOptions": {
		"module": "commonjs",
		"target": "es2016",
		"baseUrl": ".",
		"paths": {
			"@zoo/*": ["./src/*"]
		}
	},
	"exclude": [
		"node_modules",
		"**/node_modules/*"
	]
}
  1. In src/index.js, type: import {} from '@zoo/an'

  2. Trigger path intellisense after @zoo/an

Expected behavior:
Returns a directory completion for animals

Actual behavior:
Only completions for index.js and keeper.js returned

Related
#21590

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions