Skip to content

Intellisense fails to detect package.json import pathsΒ #61504

@anthonyma94

Description

@anthonyma94

πŸ”Ž Search Terms

  • path completion
  • node.js import path intellisense

πŸ•— Version & Regression Information

  • Tested on TS 5.7.3 with VSC 1.98.0 and 5.8.2 with VSC 1.98.2

⏯ Playground Link

https://github.com/anthonyma94/path-completion-repro

πŸ’» Code

package.json

  "imports": {
    "#foo/*": {
      "types": [
        "./src/foo/*.ts",
        "./src/foo/*"
      ],
      "default": [
        "./src/foo/*"
      ]
    }
  },

src/foo/test.ts

export const testFunc = () => {}

src/index.ts

import { testFunc } from "#foo/test";

testFunc();

πŸ™ Actual behavior

Repro for #52460.

Path completion intellisense kicks in for symbol resolution:

Image

But not path resolution:

Image

πŸ™‚ Expected behavior

I expect Intellisense to work for both scenarios.

Additional information about the issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    7.0 LS MigrationDomain: LS: Completion ListsThe issue relates to showing completion lists in an editorHelp WantedYou can do thisPossible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some cases

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions