style(compiler-cli): reformat of codebase with new clang-format version (#36520)

This commit reformats the packages/compiler-cli tree using the new version
of clang-format.

PR Close #36520
This commit is contained in:
Alex Rickabaugh
2020-04-07 12:43:43 -07:00
committed by atscott
parent 717df13207
commit 0a69a2832b
205 changed files with 2949 additions and 2122 deletions

View File

@ -10,7 +10,7 @@
import * as ts from 'typescript';
import {AbsoluteFsPath, NgtscCompilerHost, dirname, getFileSystem, getSourceFileOrError} from '../../file_system';
import {AbsoluteFsPath, dirname, getFileSystem, getSourceFileOrError, NgtscCompilerHost} from '../../file_system';
export function makeProgram(
files: {name: AbsoluteFsPath, contents: string, isRoot?: boolean}[],
@ -25,7 +25,8 @@ export function makeProgram(
const compilerOptions = {
noLib: true,
experimentalDecorators: true,
moduleResolution: ts.ModuleResolutionKind.NodeJs, ...options
moduleResolution: ts.ModuleResolutionKind.NodeJs,
...options
};
const compilerHost = new NgtscCompilerHost(fs, compilerOptions);
const rootNames = files.filter(file => file.isRoot !== false)
@ -38,7 +39,7 @@ export function makeProgram(
let message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
if (diagnostic.file) {
const {line, character} =
diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start !);
diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start!);
message = `${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`;
}
return `Error: ${message}`;