Skip to content

tsgo: Declaration source mapping points to wrong source file #158

@namhtpyn

Description

@namhtpyn

Bug Report

When using tsgo to generate declaration source mapping files, the source mappings incorrectly point to the declaration file (.d.ts) instead of the original source file (.ts/.tsx).

Expected Behavior

The source map should point to the original source TypeScript file, allowing proper navigation from the declaration file to the source code.

Actual Behavior

The source map points to the declaration file itself, making source navigation ineffective.

Reproduction

  1. Generate declaration files with source maps using tsgo
  2. Check the sources field in the generated .d.ts.map file
  3. Observe that it points to the .d.ts file instead of the original .ts file

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions