Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

[scopes] Handle edge-case mappings that come up in TS and other misc bugs #6092

Merged
merged 8 commits into from
Apr 25, 2018

Conversation

loganfsmyth
Copy link
Contributor

Refs Issue: #5561

Summary of Changes

  • A few misc bugs and generalizations for the mapping logic
  • Properly distinguish TS and TSX files so they parse well
  • When mapping original declarations, also find original location of the declaration itself and attempt to use that location as one option for applicable bindings
    • This allows TS class declarations to be mapped properly.

These changes have two major effects, as visible in the screenshots below:

  • Declaration names that mapped to export.Foo = Foo; instead of the declaration are given lower priority to hopefully avoid mapping a binding to the whole exports object (the {...}) in the shots below
  • Declarations with decorators now map to the declaration instead of decorator-related output

Screenshots/Videos (OPTIONAL)

Behavior previously:

screen shot 2018-04-24 at 4 45 20 pm

With this PR:

screen shot 2018-04-24 at 4 46 20 pm

@jasonLaster jasonLaster merged commit fb17572 into firefox-devtools:master Apr 25, 2018
@loganfsmyth loganfsmyth deleted the applicable-priority branch April 25, 2018 19:33
jasonLaster added a commit to jasonLaster/debugger.html that referenced this pull request Apr 26, 2018
jasonLaster added a commit to jasonLaster/debugger.html that referenced this pull request Apr 26, 2018
darkwing pushed a commit that referenced this pull request Apr 26, 2018
* Revert "If there are too many possible bindings, assume they are all bad. (#6099)"

This reverts commit 770c615.

* Revert "[scopes] Handle edge-case mappings that come up in TS and other misc bugs (#6092)"

This reverts commit fb17572.
jasonLaster added a commit that referenced this pull request Apr 30, 2018
* Revert "If there are too many possible bindings, assume they are all bad. (#6099)"

This reverts commit 770c615.

* Revert "[scopes] Handle edge-case mappings that come up in TS and other misc bugs (#6092)"

This reverts commit fb17572.
jasonLaster added a commit that referenced this pull request Apr 30, 2018
* Revert "If there are too many possible bindings, assume they are all bad. (#6099)"

This reverts commit 770c615.

* Revert "[scopes] Handle edge-case mappings that come up in TS and other misc bugs (#6092)"

This reverts commit fb17572.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants