Skip to content

Show JS/TS References Code Lens for Inner Functions  #22981

Closed

Description

@mjbvz

From Mohamed Hegazy (@mhegazy):

https://raw.githubusercontent.com/Microsoft/TypeScript/master/src/compiler/checker.ts

createTypeChecker is our main container function in this file, I would expect inner functions in it to have reference counts, e.g. function getJsxNamesace; it is worth noting that enums inside this function are marked, e.g. const enum TypeSystemPropertyName.

For locals, I am not so sure, but for example, const emptyArray = [] this is more of a global/static variable for this function.

Activity

  1. added
    javascript
    typescript
    on Mar 22, 2017
  2. added
    feature-request
    on Mar 22, 2017
  3. added
    help wanted
    on Nov 21, 2017
  4. added this to the On Deck milestone on Dec 15, 2018
  5. added
    good first issue
    on Oct 22, 2019
  6. dhairyanadapara commented on Oct 27, 2019

    @dhairyanadapara
    Contributor

    Matt Bierner (@mjbvz) I want to work on this issue. Can you please give me a few tips for the solution?

  7. mjbvz commented on Oct 31, 2019

    @mjbvz
    ContributorAuthor

    We want a new setting that lets you see references on non-exported functions too. You should also see if there's a way for us to be smarted about knowing which functions to show references on and which not to

  8. dhairyanadapara commented on Nov 2, 2019

    @dhairyanadapara
    Contributor

    Matt Bierner (@mjbvz) can you please provide how I can verify the change? Any way I can get the navtree?

  9. mjbvz commented on Nov 2, 2019

    @mjbvz
    ContributorAuthor

    You can verify by looking at some real world code and confirming the code lens shows up when expected. The TypeScript project for example uses nested functions pretty heavily

  10. added
    verification-needed
    on Nov 23, 2019
  11. alexr00 commented on Dec 4, 2019

    @alexr00
    Member

    Verified that inner functions get a reference code lens when typescript.referencesCodeLens.showOnAllFunctions is true.

  12. added
    verified
    and removed
    verified
    on Dec 4, 2019
  13. added
    verified
    on Dec 5, 2019
  14. locked and limited conversation to collaborators on Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestgood first issuehelp wantedjavascripttypescriptverification-neededverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions