-
Notifications
You must be signed in to change notification settings - Fork 11
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
Does not work with functions not in global scope #8
Comments
It actually does. See the new example on the readme. Though I agree that the syntax for making the declaration is not ideal:
|
Also, if you are looking through your fork, you may want to update things... I've already pushed some fairly significant changes/fixes. |
Oh no I saw that in Example:
I was thinking about this and perhaps there's two ways to attack this problem.
|
This is especially an issue for people who write JavaScript programs that don't leak any global variables and their public interface is limited. |
Oh, ok. That's a thornier problem. And the private scoping pattern is pretty common... I'll give it some thought. |
A crazy idea to have automated tests and private functions:
|
That's not so crazy, really. Proxino's error-detection product did something similar. We got a lot of flack for it from developers, but people might not care so much in this case (since TypedJS is for testing, not production code). |
I wrote it and it's working pretty ok. I haven't done the assigning of new names or find/replace all references yet but for now it works for functions which don't call other functions. |
But you knew that already :)
The text was updated successfully, but these errors were encountered: