chore: adjust formatting to new clang-format.

- fixes wrapping for object literal keys called `template`.
- spacing in destructuring expressions.
- changes to keep trailing return types of functions closer to their
  function declaration.
- better formatting of string literals.

Closes #4828
This commit is contained in:
Martin Probst
2015-10-28 11:19:10 +01:00
parent 4a1b873fad
commit c02f2bdab0
50 changed files with 245 additions and 236 deletions
@@ -68,8 +68,8 @@ export function isPropertyUpdated(changes: {[key: string]: any}, viewModel: any)
}
// TODO: vsavkin remove it once https://github.com/angular/angular/issues/3011 is implemented
export function selectValueAccessor(dir: NgControl, valueAccessors: ControlValueAccessor[]):
ControlValueAccessor {
export function selectValueAccessor(dir: NgControl,
valueAccessors: ControlValueAccessor[]): ControlValueAccessor {
if (isBlank(valueAccessors)) return null;
var defaultAccessor;
+7 -6
View File
@@ -111,8 +111,8 @@ export abstract class AbstractControl {
setParent(parent: ControlGroup | ControlArray): void { this._parent = parent; }
updateValueAndValidity({onlySelf, emitEvent}: {onlySelf?: boolean, emitEvent?: boolean} = {}):
void {
updateValueAndValidity(
{onlySelf, emitEvent}: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {
onlySelf = normalizeBool(onlySelf);
emitEvent = isPresent(emitEvent) ? emitEvent : true;
@@ -237,10 +237,11 @@ export class Control extends AbstractControl {
* via an `onChange` event. This is the default behavior if `emitModelToViewChange` is not
* specified.
*/
updateValue(value: any,
{onlySelf, emitEvent, emitModelToViewChange}:
{onlySelf?: boolean, emitEvent?: boolean, emitModelToViewChange?: boolean} = {}):
void {
updateValue(value: any, {onlySelf, emitEvent, emitModelToViewChange}: {
onlySelf?: boolean,
emitEvent?: boolean,
emitModelToViewChange?: boolean
} = {}): void {
emitModelToViewChange = isPresent(emitModelToViewChange) ? emitModelToViewChange : true;
this._value = value;
if (isPresent(this._onChange) && emitModelToViewChange) this._onChange(this._value);