Files
sdk/pkg/dev_compiler/test/codegen/expect/script.js
T
Olivier Chafik 3307317454 JS: Format if statements with no else on a single line
To match Dart style:
https://www.dartlang.org/effective-dart/style/#do-use-curly-braces-for-all-flow-control-structures

(also, that's the style we use in our .js runtime files, so that will help with diffs of the js->dart runtime migration from https://github.com/dart-lang/dev_compiler/issues/310)

BUG=
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1524843002 .
2015-12-16 19:45:19 +00:00

17 lines
416 B
JavaScript
Executable File

dart_library.library('script', null, /* Imports */[
"dart/_runtime",
'dart/core'
], /* Lazy imports */[
], function(exports, dart, core) {
'use strict';
let dartx = dart.dartx;
function main(args) {
let name = args[dartx.join](' ');
if (name == '') name = 'world';
core.print(`hello ${name}`);
}
dart.fn(main, dart.void, [core.List$(core.String)]);
// Exports:
exports.main = main;
});