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

Helpers depending on helpers #481

Closed
Rich-Harris opened this issue Apr 14, 2017 · 0 comments · Fixed by #482
Closed

Helpers depending on helpers #481

Rich-Harris opened this issue Apr 14, 2017 · 0 comments · Fixed by #482

Comments

@Rich-Harris
Copy link
Member

Re #479, but is a broader issue — would be good if helpers didn't need to be entirely self-contained, because then they could share common functionality. For example this line in dispatchObservers should really be replaced with a call to differs. It would also mean that methods with dev mode variants could do their checks then just call the underlying function.

We could do this in an automatic way by parsing ASTs, analysing them to discover references to identifiers that aren't parameters or built-ins, marking those as dependencies, then (if necessary) rewriting those identifiers to their aliases.

(We only need to do this when the helpers are inlined, of course.)

Rich-Harris added a commit that referenced this issue Apr 14, 2017
allow helpers to depend on one another
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

Successfully merging a pull request may close this issue.

1 participant