Skip to content

Autocomple import wrong when rootDirs is defined #28550

@juanluispaz

Description

@juanluispaz

TypeScript Version: 3.1.6

If you configure in the tsconfig.json a rootDirs section like

{
    "compilerOptions": {
        "baseUrl": "src",
        "rootDirs": [
            "src",
            "src_gen"
        ]
    }
}

When you try autocomplete an import in a subfolder the subjections are wrong

Example

File src/example/example.tsx

import { exampleImport } from './[autocomplete here]'

Try to autocomplete after ./ the displayed options are wrong.

Note: It only happens in a subfolder, if you try to do the same in a file inside the src folder it works properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: LS: Completion ListsThe issue relates to showing completion lists in an editorFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions