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 08:59:19 +01:00
parent 4a1b873fad
commit c02f2bdab0
50 changed files with 245 additions and 236 deletions

View File

@ -28,8 +28,8 @@ var _postMessage: PostMessageInterface = <any>postMessage;
* See the bootstrap() docs for more details.
*/
export function bootstrapWebWorker(
appComponentType: Type, componentInjectableProviders: Array<Type | Provider | any[]> = null):
Promise<ComponentRef> {
appComponentType: Type,
componentInjectableProviders: Array<Type | Provider | any[]> = null): Promise<ComponentRef> {
Parse5DomAdapter.makeCurrent();
var sink = new PostMessageBusSink({
postMessage: (message: any, transferrables?:[ArrayBuffer]) => {

View File

@ -91,8 +91,8 @@ class PrintLogger {
logGroupEnd() {}
}
function webWorkerProviders(appComponentType, bus: MessageBus, initData: {[key: string]: any}):
Array<Type | Provider | any[]> {
function webWorkerProviders(appComponentType, bus: MessageBus,
initData: {[key: string]: any}): Array<Type | Provider | any[]> {
return [
compilerProviders(),
Serializer,
@ -114,9 +114,9 @@ function webWorkerProviders(appComponentType, bus: MessageBus, initData: {[key:
];
}
export function bootstrapWebWorkerCommon(appComponentType: Type, bus: MessageBus,
appProviders: Array<Type | Provider | any[]> = null):
Promise<ComponentRef> {
export function bootstrapWebWorkerCommon(
appComponentType: Type, bus: MessageBus,
appProviders: Array<Type | Provider | any[]> = null): Promise<ComponentRef> {
var bootstrapProcess: PromiseCompleter<any> = PromiseWrapper.completer();
var appPromise = platform().asyncApplication((zone: NgZone) => {
// TODO(rado): prepopulate template cache, so applications with only

View File

@ -1,6 +1,6 @@
// no deserialization is necessary in TS.
// This is only here to match dart interface
export function deserializeGenericEvent(serializedEvent: {[key: string]: any}):
{[key: string]: any} {
export function deserializeGenericEvent(
serializedEvent: {[key: string]: any}): {[key: string]: any} {
return serializedEvent;
}