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

When/how are file event handlers called? #2

Open
kristianmandrup opened this issue Nov 24, 2016 · 2 comments
Open

When/how are file event handlers called? #2

kristianmandrup opened this issue Nov 24, 2016 · 2 comments

Comments

@kristianmandrup
Copy link

I can't figure out how these event handlers fit into the pipeline?
I've be trying to customise aster to not be hardcoded to only work with files.
I'd like to make my own custom runner, but not sure where I should call/trigger equivalent events like onComplete etc. Is it the Observable created for each read file?

Please advice. Thanks!

@kristianmandrup
Copy link
Author

Ah, I think I got confused about the function names. I'm complete newbie to Observable and Rx.
So when you create an Observable, you pass 3 functions in this order: successHandler, errorHandler, onCompleteHandler. So the question then becomes, what is the files` argument exactly? any Observable as well, since it can be subscribed on? hence I guess it's a stream of events, such as an array of files being processed one at a time... makes sense!
Cheers :)

@RReverser
Copy link
Member

They're just file ASTs (wrappers around ESTree Program node).

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

2 participants