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
{{ message }}
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.
Dart will not compile executable code left in the root of a document. To match semantics with Dart, it would be nice if ts2dart moved all root executable lines into a main(){} function.
After passing through ts2dart becomes (edited for readability):
var document ='foo' ;
class angular {
staticbootstrap( String s , List<String> m ) { }
}
classApp {
staticvar module = {
"name":"App"
};
}
angular . bootstrap ( document , [ App . module . name ] ) ;
The last line calling angular.bootstrap throws several compiler warning in Dart, as Dart expects this to be a declaration, not an invocation. If ts2dart put that in a main(){}, that would be a Good Thing(tm).
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Dart will not compile executable code left in the root of a document. To match semantics with Dart, it would be nice if ts2dart moved all root executable lines into a
main(){}
function.Example:
After passing through ts2dart becomes (edited for readability):
The last line calling angular.bootstrap throws several compiler warning in Dart, as Dart expects this to be a declaration, not an invocation. If ts2dart put that in a
main(){}
, that would be a Good Thing(tm).The text was updated successfully, but these errors were encountered: