You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be lovely if gorillascript (optionally) output its type annotations in comments formatted for the Google Closure Compiler. Users could then use the GCC to perform static type checking on their code.
So
letincrement(xasNumber)x+1
would compile to something like
/** * @param {number} x */functionincrement(x){if(typeofx!=="number"){thrownewTypeError("Expected x to be a Number, got "+__typeof(x));}returnx+1;}
The text was updated successfully, but these errors were encountered:
I think it would be lovely if gorillascript (optionally) output its type annotations in comments formatted for the Google Closure Compiler. Users could then use the GCC to perform static type checking on their code.
So
would compile to something like
The text was updated successfully, but these errors were encountered: