Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DevTools] Make Functions Clickable to Jump to Definition #30769

Merged
merged 3 commits into from
Aug 22, 2024

Commits on Aug 21, 2024

  1. Remove ƒ prefix when displaying functions

    This is a cute short cut and there's precedence in how Chrome prints functions
    in the console *if* the function's toString would've had a function prefix
    like if it was a function declaration or expression. It does not do this
    for arrow functions or object methods.
    
    Elsewhere in the JS ecosystem this isn't really used anywhere.
    It invites more questions than it answers.
    
    The parenthesis and curlies are enough. There's no ambiguity here since
    strings have quotations. It looks better with just its object method form.
    
    Keeping it simple seems best.
    sebmarkbage committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    1d2856c View commit details
    Browse the repository at this point in the history
  2. Use arrow function notation when a name is missing

    While this might not be an arrow function it's a common enough annotation
    for an unnamed function that people would get it.
    sebmarkbage committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    2d493e9 View commit details
    Browse the repository at this point in the history
  3. Make functions clickable and style them like a link

    Hover state makes it a little clearer that it's clickable and follows the
    pattern of the owner list.
    sebmarkbage committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    7b58f2a View commit details
    Browse the repository at this point in the history