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

@ -20,7 +20,9 @@ export class NormalService {
})
export class AppComponent {
found: boolean;
constructor(service: ShakeableService) { this.found = !!service.normal; }
constructor(service: ShakeableService) {
this.found = !!service.normal;
}
}
@NgModule({

View File

@ -29,7 +29,9 @@ export class AppComponent {
export class ChildComponent {
found: boolean;
constructor(@Optional() @Self() service: Service|null) { this.found = !!service; }
constructor(@Optional() @Self() service: Service|null) {
this.found = !!service;
}
}
@NgModule({

View File

@ -21,7 +21,9 @@ export class NormalService {
})
export class AppComponent {
found: boolean;
constructor(service: NormalService) { this.found = !!service.shakeable; }
constructor(service: NormalService) {
this.found = !!service.shakeable;
}
}
@NgModule({

View File

@ -17,7 +17,9 @@ import {ServerModule} from '@angular/platform-server';
})
export class AppComponent {
data: string;
constructor(service: Service) { this.data = service.data; }
constructor(service: Service) {
this.data = service.data;
}
}
@NgModule({

View File

@ -6,11 +6,13 @@
* found in the LICENSE file at https://angular.io/license
*/
import {Component, Inject, Injectable, InjectionToken, NgModule, forwardRef, inject} from '@angular/core';
import {Component, forwardRef, Inject, inject, Injectable, InjectionToken, NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {ServerModule} from '@angular/platform-server';
export interface IService { readonly dep: {readonly data: string;}; }
export interface IService {
readonly dep: {readonly data: string;};
}
@NgModule({})
export class TokenModule {
@ -28,7 +30,9 @@ export const TOKEN = new InjectionToken('test', {
})
export class AppComponent {
data: string;
constructor(@Inject(TOKEN) service: IService) { this.data = service.dep.data; }
constructor(@Inject(TOKEN) service: IService) {
this.data = service.dep.data;
}
}
@NgModule({

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {Component, INJECTOR, Injectable, NgModule} from '@angular/core';
import {Component, Injectable, INJECTOR, NgModule} from '@angular/core';
import {TestBed} from '@angular/core/testing';
import {renderModuleFactory} from '@angular/platform-server';
import {BasicAppModuleNgFactory} from 'app_built/src/basic.ngfactory';
@ -104,7 +104,6 @@ describe('ngInjectableDef Bazel Integration', () => {
});
it('allows provider override in JIT for module-scoped @Injectables', () => {
@NgModule()
class Module {
}
@ -172,7 +171,9 @@ describe('ngInjectableDef Bazel Integration', () => {
// ChildServices exteds ParentService but does not have @Injectable
class ChildService extends ParentService {
constructor(value: string) { super(value); }
constructor(value: string) {
super(value);
}
static ngInjectableDef = {
providedIn: 'root',
factory: () => new ChildService('child'),

View File

@ -6,17 +6,23 @@
* found in the LICENSE file at https://angular.io/license
*/
import {Injectable, InjectionToken, Injector, NgModule, forwardRef, ɵcreateInjector as createInjector} from '@angular/core';
import {forwardRef, Injectable, InjectionToken, Injector, NgModule, ɵcreateInjector as createInjector} from '@angular/core';
import {AOT_TOKEN, AotModule, AotService} from 'app_built/src/module';
describe('Ivy NgModule', () => {
describe('AOT', () => {
let injector: Injector;
beforeEach(() => { injector = createInjector(AotModule); });
it('works', () => { expect(injector.get(AotService) instanceof AotService).toBeTruthy(); });
beforeEach(() => {
injector = createInjector(AotModule);
});
it('works', () => {
expect(injector.get(AotService) instanceof AotService).toBeTruthy();
});
it('merges imports and exports', () => { expect(injector.get(AOT_TOKEN)).toEqual('exports'); });
it('merges imports and exports', () => {
expect(injector.get(AOT_TOKEN)).toEqual('exports');
});
});
@ -38,7 +44,9 @@ describe('Ivy NgModule', () => {
class JitAppModule {
}
it('works', () => { createInjector(JitAppModule); });
it('works', () => {
createInjector(JitAppModule);
});
it('throws an error on circular module dependencies', () => {
@NgModule({