Skip to content

Only generate a mapping at a generated location for the most specific mapping #61

Open
@fitzgen

Description

@fitzgen

If we have the following mappings, should we generate them all in the source map or only the most specific mapping?

map.addMapping({
  generated: { line: 3, column: 5 }
});
map.addMapping({
  generated: { line: 3, column: 5 },
  original: { line: 6, column: 7 },
  source: 'foo.js'
});
map.addMapping({
  generated: { line: 3, column: 5 },
  original: { line: 6, column: 7 },
  source: 'foo.js',
  name: 'bar'
});

What should be the behavior if there is different original locations for the same generated position? Should we still use the most specific/detailed mapping and ignore the others?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions