Skip to content

Auto import generates wrong module specifier for a/index.ts when a.ts exists #36730

Closed as not planned

Description

TypeScript Version: 3.8.1-rc

Search Terms: auto import index

Code

// tsconfig.json
{
  "compilerOptions": {
    "module": "commonjs" // ensures `importModuleSpecifierEnding` defaults to `Ending.Minimal`
  }
}

// a/index.ts
export const aIndex = 0;

// a.ts
export {}

// index.ts
aIndex/* auto-import here */

Expected behavior:
Module specifier from auto-import is "./a/index"

Actual behavior:
Module specifier is "./a"

Related Issues: #36725 #24779

Activity

  1. added
    Fix Available
    on Feb 4, 2021
  2. added
    Rescheduled
    on Mar 4, 2021
  3. 4 remaining items

  4. locked as resolved and limited conversation to collaborators on Dec 3, 2025
  5. RyanCavanaugh commented on Dec 3, 2025

    @RyanCavanaugh
    Member

    Closing language service bugs related to the 6.0 implementation. For more information, see #62827

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

7.0 LS MigrationBugDomain: LS: Auto-importFix AvailableRescheduled

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions