mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 20:29:11 +00:00

closes #16440 This PR adds `--coverage` flag to `deno run` command. When the flag is specified, it generates the coverage profile in the directory specified (default is `coverage`). The coverage directory can also be specified from the env var `DENO_COVERAGE_DIR`. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
17 lines
229 B
TypeScript
17 lines
229 B
TypeScript
function foo(a: number, b: number) {
|
|
if (a > 0) {
|
|
console.log(a);
|
|
} else {
|
|
console.log(a);
|
|
}
|
|
|
|
if (b > 0) {
|
|
console.log(b);
|
|
} else {
|
|
console.log(b);
|
|
}
|
|
}
|
|
|
|
const [a = 0, b = 0] = Deno.args;
|
|
|
|
foo(+a, +b);
|