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

Find All References should include composed return value #58509

Open
6 tasks done
justin-m-lacy opened this issue May 12, 2024 · 0 comments
Open
6 tasks done

Find All References should include composed return value #58509

justin-m-lacy opened this issue May 12, 2024 · 0 comments

Comments

@justin-m-lacy
Copy link

πŸ” Search Terms

"Find all References", "find references composable", "find all references returned"

βœ… Viability Checklist

⭐ Suggestion

Running 'Find all references' on a Function defined within a function and returned in a composed object, should include references to the function defined on the composed object.

πŸ“ƒ Motivating Example

It's a common practice to compose objects within functions that are exported for use by the program.
For example, using object composition with pinia and vue:

import { defineStore } from "pinia";

export const useMyStore = defineStore('mystore', () => {

	function funcA() { }

	return {
		funcA,
	}

});

However, using 'findAllReferences' on the function defined within the composing function does not detect references through the returned object:

findAllRefs

Using 'findAllReferences' on the function defined on the returned object itself, does return such references:

findAllRefsReturn

πŸ’» Use Cases

  1. When editing a function in a composed store, it is common to check for references to the function being changed.
  2. The references of the function defined within the composable function only returns the references within the store, rather than uses linked by the composed object.
  3. Currently you must scroll from the function being worked on to the composed object, and run 'Find All References' from there. It is a minor inconvenience, but an extremely common one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant