From cde4dbb35132848ffece59ef9cfaccff32347124 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 14 Jul 2020 15:24:17 -0400 Subject: Use dprint for internal formatting (#6682) --- cli/js/compiler_api.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'cli/js/compiler_api.ts') diff --git a/cli/js/compiler_api.ts b/cli/js/compiler_api.ts index 8a50e0b3d..e0488b7f6 100644 --- a/cli/js/compiler_api.ts +++ b/cli/js/compiler_api.ts @@ -18,7 +18,7 @@ function checkRelative(specifier: string): string { // TODO(bartlomieju): change return type to interface? export function transpileOnly( sources: Record, - options: CompilerOptions = {} + options: CompilerOptions = {}, ): Promise> { util.log("Deno.transpileOnly", { sources: Object.keys(sources), options }); const payload = { @@ -32,7 +32,7 @@ export function transpileOnly( export async function compile( rootName: string, sources?: Record, - options: CompilerOptions = {} + options: CompilerOptions = {}, ): Promise<[DiagnosticItem[] | undefined, Record]> { const payload = { rootName: sources ? rootName : checkRelative(rootName), @@ -47,8 +47,9 @@ export async function compile( }); const result = await runtimeCompilerOps.compile(payload); util.assert(result.emitMap); - const maybeDiagnostics = - result.diagnostics.length === 0 ? undefined : result.diagnostics; + const maybeDiagnostics = result.diagnostics.length === 0 + ? undefined + : result.diagnostics; const emitMap: Record = {}; @@ -63,7 +64,7 @@ export async function compile( export async function bundle( rootName: string, sources?: Record, - options: CompilerOptions = {} + options: CompilerOptions = {}, ): Promise<[DiagnosticItem[] | undefined, string]> { const payload = { rootName: sources ? rootName : checkRelative(rootName), @@ -78,7 +79,8 @@ export async function bundle( }); const result = await runtimeCompilerOps.compile(payload); util.assert(result.output); - const maybeDiagnostics = - result.diagnostics.length === 0 ? undefined : result.diagnostics; + const maybeDiagnostics = result.diagnostics.length === 0 + ? undefined + : result.diagnostics; return [maybeDiagnostics, result.output]; } -- cgit v1.2.3