Skip to content

Commit f399e7b

Browse files
refactor: minor changes
1 parent 7f62f4f commit f399e7b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tools/build/src/typescript/build-ts.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function buildTypescript(
2525
passThru?: Array<string>,
2626
options?: BuildTypescriptOptions,
2727
) {
28-
const { verbose } = options ?? { verbose: false };
28+
const { verbose, downlevel } = options ?? {};
2929
const packageDir = process.cwd();
3030
const tsConfigPath = path.join(packageDir, 'tsconfig.json');
3131

@@ -34,10 +34,11 @@ export function buildTypescript(
3434
process.exit(1);
3535
}
3636

37-
verbose &&
37+
if (verbose) {
3838
console.log(chalk.blue.bold(`Building TypeScript (v${ts.version})`));
39-
verbose && console.log(chalk.blue('Building TypeScript'));
40-
verbose && console.log(chalk.gray(tsConfigPath));
39+
console.log(chalk.blue('Building TypeScript'));
40+
console.log(chalk.gray(tsConfigPath));
41+
}
4142

4243
// Any additional options passed in via the CLI
4344
const cliCompilerOptions = parsePassThruOptions(passThru);
@@ -61,7 +62,7 @@ export function buildTypescript(
6162
// Build the project
6263
const exitStatus = builder.build();
6364

64-
if (options?.downlevel) {
65+
if (downlevel) {
6566
runTypescriptDownlevel({
6667
verbose,
6768
});

0 commit comments

Comments
 (0)