diff options
Diffstat (limited to 'cli/js/compiler_api.ts')
-rw-r--r-- | cli/js/compiler_api.ts | 16 |
1 files changed, 9 insertions, 7 deletions
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<string, string>, - options: CompilerOptions = {} + options: CompilerOptions = {}, ): Promise<Record<string, TranspileOnlyResult>> { 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<string, string>, - options: CompilerOptions = {} + options: CompilerOptions = {}, ): Promise<[DiagnosticItem[] | undefined, Record<string, string>]> { 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<string, string> = {}; @@ -63,7 +64,7 @@ export async function compile( export async function bundle( rootName: string, sources?: Record<string, string>, - 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]; } |