diff --git a/modules/angular2/src/core/application.ts b/modules/angular2/src/core/application.ts index 65dea16a32..dcc6c1b054 100644 --- a/modules/angular2/src/core/application.ts +++ b/modules/angular2/src/core/application.ts @@ -18,9 +18,9 @@ export { } from './application_ref'; /// See [commonBootstrap] for detailed documentation. -export function bootstrap(appComponentType: /*Type*/ any, - appProviders: Array = null): - Promise { +export function bootstrap( + appComponentType: /*Type*/ any, + appProviders: Array = null): Promise { var providers = [compilerProviders()]; if (isPresent(appProviders)) { providers.push(appProviders); diff --git a/modules/angular2/src/core/application_common.ts b/modules/angular2/src/core/application_common.ts index acfb60ab4b..6e8d811da7 100644 --- a/modules/angular2/src/core/application_common.ts +++ b/modules/angular2/src/core/application_common.ts @@ -218,9 +218,9 @@ export function platform(providers?: Array): PlatformRe * * Returns a `Promise` of {@link ComponentRef}. */ -export function commonBootstrap(appComponentType: /*Type*/ any, - appProviders: Array = null): - Promise { +export function commonBootstrap( + appComponentType: /*Type*/ any, + appProviders: Array = null): Promise { var p = platform(); var bindings = [applicationCommonProviders(), applicationDomProviders()]; if (isPresent(appProviders)) { diff --git a/modules/angular2/src/core/application_ref.ts b/modules/angular2/src/core/application_ref.ts index 8d134c8d78..6b3904b02c 100644 --- a/modules/angular2/src/core/application_ref.ts +++ b/modules/angular2/src/core/application_ref.ts @@ -203,8 +203,8 @@ export abstract class PlatformRef { * new application. Once this promise resolves, the application will be * constructed in the same manner as a normal `application()`. */ - abstract asyncApplication(bindingFn: (zone: NgZone) => Promise>): - Promise; + abstract asyncApplication(bindingFn: (zone: NgZone) => + Promise>): Promise; /** * Destroy the Angular platform and all Angular applications on the page. @@ -228,8 +228,8 @@ export class PlatformRef_ extends PlatformRef { return app; } - asyncApplication(bindingFn: (zone: NgZone) => - Promise>): Promise { + asyncApplication(bindingFn: (zone: NgZone) => Promise>): + Promise { var zone = createNgZone(); var completer = PromiseWrapper.completer(); zone.run(() => { @@ -314,8 +314,8 @@ export abstract class ApplicationRef { * app.bootstrap(SecondRootComponent, [provide(OverrideBinding, {useClass: OverriddenBinding})]); * ``` */ - abstract bootstrap(componentType: Type, providers?: Array): - Promise; + abstract bootstrap(componentType: Type, + providers?: Array): Promise; /** * Retrieve the application {@link Injector}. diff --git a/modules/angular2/src/core/change_detection/constants.ts b/modules/angular2/src/core/change_detection/constants.ts index ef50a70e68..fc3666e533 100644 --- a/modules/angular2/src/core/change_detection/constants.ts +++ b/modules/angular2/src/core/change_detection/constants.ts @@ -51,8 +51,8 @@ export var CHANGE_DETECTION_STRATEGY_VALUES = [ ChangeDetectionStrategy.OnPushObserve ]; -export function isDefaultChangeDetectionStrategy(changeDetectionStrategy: ChangeDetectionStrategy): - boolean { +export function isDefaultChangeDetectionStrategy( + changeDetectionStrategy: ChangeDetectionStrategy): boolean { return isBlank(changeDetectionStrategy) || changeDetectionStrategy === ChangeDetectionStrategy.Default; } diff --git a/modules/angular2/src/core/compiler/command_compiler.ts b/modules/angular2/src/core/compiler/command_compiler.ts index c5c0d6bbac..f4f0d56cad 100644 --- a/modules/angular2/src/core/compiler/command_compiler.ts +++ b/modules/angular2/src/core/compiler/command_compiler.ts @@ -200,8 +200,8 @@ class CodegenCommandFactory implements CommandFactory { } } -function visitAndReturnContext(visitor: TemplateAstVisitor, asts: TemplateAst[], context: any): - any { +function visitAndReturnContext(visitor: TemplateAstVisitor, asts: TemplateAst[], + context: any): any { templateVisitAll(visitor, asts, context); return context; } diff --git a/modules/angular2/src/core/compiler/directive_metadata.ts b/modules/angular2/src/core/compiler/directive_metadata.ts index b4f94df8be..e56293ce82 100644 --- a/modules/angular2/src/core/compiler/directive_metadata.ts +++ b/modules/angular2/src/core/compiler/directive_metadata.ts @@ -159,7 +159,8 @@ export class CompileDirectiveMetadata { hostListeners: hostListeners, hostProperties: hostProperties, hostAttributes: hostAttributes, - lifecycleHooks: isPresent(lifecycleHooks) ? lifecycleHooks : [], template: template + lifecycleHooks: isPresent(lifecycleHooks) ? lifecycleHooks : [], + template: template }); } diff --git a/modules/angular2/src/core/compiler/html_parser.ts b/modules/angular2/src/core/compiler/html_parser.ts index 5800a66796..2b3aaaf289 100644 --- a/modules/angular2/src/core/compiler/html_parser.ts +++ b/modules/angular2/src/core/compiler/html_parser.ts @@ -40,16 +40,16 @@ function parseText(text: Text, indexInParent: number, parentSourceInfo: string): `${parentSourceInfo} > #text(${value}):nth-child(${indexInParent})`); } -function parseAttr(element: Element, parentSourceInfo: string, attrName: string, attrValue: string): - HtmlAttrAst { +function parseAttr(element: Element, parentSourceInfo: string, attrName: string, + attrValue: string): HtmlAttrAst { // TODO(tbosch): add source row/column source info from parse5 / package:html var lowerCaseAttrName = attrName.toLowerCase(); return new HtmlAttrAst(lowerCaseAttrName, attrValue, `${parentSourceInfo}[${lowerCaseAttrName}=${attrValue}]`); } -function parseElement(element: Element, indexInParent: number, parentSourceInfo: string): - HtmlElementAst { +function parseElement(element: Element, indexInParent: number, + parentSourceInfo: string): HtmlElementAst { // normalize nodename always as lower case so that following build steps // can rely on this var nodeName = DOM.nodeName(element).toLowerCase(); diff --git a/modules/angular2/src/core/compiler/style_url_resolver.ts b/modules/angular2/src/core/compiler/style_url_resolver.ts index 7736514d90..b1ea62cfbe 100644 --- a/modules/angular2/src/core/compiler/style_url_resolver.ts +++ b/modules/angular2/src/core/compiler/style_url_resolver.ts @@ -24,8 +24,8 @@ export function isStyleUrlResolvable(url: string): boolean { * Rewrites stylesheets by resolving and removing the @import urls that * are either relative or don't have a `package:` scheme */ -export function extractStyleUrls(resolver: UrlResolver, baseUrl: string, cssText: string): - StyleWithImports { +export function extractStyleUrls(resolver: UrlResolver, baseUrl: string, + cssText: string): StyleWithImports { var foundUrls = []; var modifiedCssText = StringWrapper.replaceAllMapped(cssText, _cssImportRe, (m) => { var url = isPresent(m[1]) ? m[1] : m[2]; diff --git a/modules/angular2/src/core/compiler/template_compiler.ts b/modules/angular2/src/core/compiler/template_compiler.ts index 7e187d0800..6dd9ee511d 100644 --- a/modules/angular2/src/core/compiler/template_compiler.ts +++ b/modules/angular2/src/core/compiler/template_compiler.ts @@ -50,8 +50,8 @@ export class TemplateCompiler { this._appId = appId; } - normalizeDirectiveMetadata(directive: - CompileDirectiveMetadata): Promise { + normalizeDirectiveMetadata(directive: CompileDirectiveMetadata): + Promise { if (!directive.isComponent) { // For non components there is nothing to be normalized yet. return PromiseWrapper.resolve(directive); @@ -70,7 +70,8 @@ export class TemplateCompiler { hostListeners: directive.hostListeners, hostProperties: directive.hostProperties, hostAttributes: directive.hostAttributes, - lifecycleHooks: directive.lifecycleHooks, template: normalizedTemplate + lifecycleHooks: directive.lifecycleHooks, + template: normalizedTemplate })); } diff --git a/modules/angular2/src/core/di/provider.ts b/modules/angular2/src/core/di/provider.ts index 1d5822c111..c9d080214e 100644 --- a/modules/angular2/src/core/di/provider.ts +++ b/modules/angular2/src/core/di/provider.ts @@ -686,8 +686,8 @@ function _extractToken(typeOrFunc, metadata /*any[] | any*/, params: any[][]): D } } -function _createDependency(token, optional, lowerBoundVisibility, upperBoundVisibility, depProps): - Dependency { +function _createDependency(token, optional, lowerBoundVisibility, upperBoundVisibility, + depProps): Dependency { return new Dependency(Key.get(token), optional, lowerBoundVisibility, upperBoundVisibility, depProps); } diff --git a/modules/angular2/src/core/facade/collection.ts b/modules/angular2/src/core/facade/collection.ts index 330ecbe32f..d653b345be 100644 --- a/modules/angular2/src/core/facade/collection.ts +++ b/modules/angular2/src/core/facade/collection.ts @@ -61,8 +61,9 @@ var _clearValues: {(m: Map)} = (function() { var _arrayFromMap: {(m: Map, getValues: boolean): any[]} = (function() { try { if (((new Map()).values()).next) { - return function createArrayFromMap(m: Map, getValues: boolean): - any[] { return getValues ? (Array).from(m.values()) : (Array).from(m.keys()); }; + return function createArrayFromMap(m: Map, getValues: boolean): any[] { + return getValues ? (Array).from(m.values()) : (Array).from(m.keys()); + }; } } catch (e) { } diff --git a/modules/angular2/src/core/forms/directives/shared.ts b/modules/angular2/src/core/forms/directives/shared.ts index e325a6e9ab..549c89e35d 100644 --- a/modules/angular2/src/core/forms/directives/shared.ts +++ b/modules/angular2/src/core/forms/directives/shared.ts @@ -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; diff --git a/modules/angular2/src/core/forms/model.ts b/modules/angular2/src/core/forms/model.ts index 9b6c11baaa..23a7b7a1d3 100644 --- a/modules/angular2/src/core/forms/model.ts +++ b/modules/angular2/src/core/forms/model.ts @@ -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); diff --git a/modules/angular2/src/core/linker/dynamic_component_loader.ts b/modules/angular2/src/core/linker/dynamic_component_loader.ts index 795fc711ed..dd08b919b9 100644 --- a/modules/angular2/src/core/linker/dynamic_component_loader.ts +++ b/modules/angular2/src/core/linker/dynamic_component_loader.ts @@ -232,8 +232,8 @@ export abstract class DynamicComponentLoader { * Child * ``` */ - abstract loadNextToLocation(type: Type, location: ElementRef, providers?: ResolvedProvider[]): - Promise; + abstract loadNextToLocation(type: Type, location: ElementRef, + providers?: ResolvedProvider[]): Promise; } @Injectable() diff --git a/modules/angular2/src/core/linker/proto_view_factory.ts b/modules/angular2/src/core/linker/proto_view_factory.ts index 4df1fa23a3..8e7bd33471 100644 --- a/modules/angular2/src/core/linker/proto_view_factory.ts +++ b/modules/angular2/src/core/linker/proto_view_factory.ts @@ -283,9 +283,9 @@ function provideDirective(directiveResolver: DirectiveResolver, type: Type): Dir return DirectiveProvider.createFromType(type, annotation); } -export function createDirectiveVariableBindings(variableNameAndValues: Array, - directiveProviders: DirectiveProvider[]): - Map { +export function createDirectiveVariableBindings( + variableNameAndValues: Array, + directiveProviders: DirectiveProvider[]): Map { var directiveVariableBindings = new Map(); for (var i = 0; i < variableNameAndValues.length; i += 2) { var templateName = variableNameAndValues[i]; diff --git a/modules/angular2/src/core/linker/template_commands.ts b/modules/angular2/src/core/linker/template_commands.ts index f9d91d8647..612e73496e 100644 --- a/modules/angular2/src/core/linker/template_commands.ts +++ b/modules/angular2/src/core/linker/template_commands.ts @@ -165,8 +165,8 @@ export class EmbeddedTemplateCmd implements TemplateCmd, IBeginElementCmd, export function embeddedTemplate(attrNameAndValues: string[], variableNameAndValues: string[], directives: Type[], isMerged: boolean, ngContentIndex: number, - changeDetectorFactory: Function, children: TemplateCmd[]): - EmbeddedTemplateCmd { + changeDetectorFactory: Function, + children: TemplateCmd[]): EmbeddedTemplateCmd { return new EmbeddedTemplateCmd(attrNameAndValues, variableNameAndValues, directives, isMerged, ngContentIndex, changeDetectorFactory, children); } diff --git a/modules/angular2/src/core/linker/view_manager.ts b/modules/angular2/src/core/linker/view_manager.ts index 0b8ea7dca2..7dd3e264c9 100644 --- a/modules/angular2/src/core/linker/view_manager.ts +++ b/modules/angular2/src/core/linker/view_manager.ts @@ -55,8 +55,8 @@ export abstract class AppViewManager { * Throws an exception if the specified `hostLocation` is not a Host Element of a Component, or if * variable `variableName` couldn't be found in the Component View of this Component. */ - abstract getNamedElementInComponentView(hostLocation: ElementRef, variableName: string): - ElementRef; + abstract getNamedElementInComponentView(hostLocation: ElementRef, + variableName: string): ElementRef; /** * Returns the component instance for the provided Host Element. diff --git a/modules/angular2/src/core/render/api.ts b/modules/angular2/src/core/render/api.ts index 94e6d60c24..744c7377c7 100644 --- a/modules/angular2/src/core/render/api.ts +++ b/modules/angular2/src/core/render/api.ts @@ -209,8 +209,8 @@ export abstract class Renderer { * * Returns an instance of {@link RenderViewWithFragments}, representing the Render View. */ - abstract createView(protoViewRef: RenderProtoViewRef, fragmentCount: number): - RenderViewWithFragments; + abstract createView(protoViewRef: RenderProtoViewRef, + fragmentCount: number): RenderViewWithFragments; /** * Destroys a Render View specified via `viewRef`. diff --git a/modules/angular2/src/core/render/dom/dom_renderer.ts b/modules/angular2/src/core/render/dom/dom_renderer.ts index dc5380af22..4f3c0ae442 100644 --- a/modules/angular2/src/core/render/dom/dom_renderer.ts +++ b/modules/angular2/src/core/render/dom/dom_renderer.ts @@ -131,8 +131,8 @@ export abstract class DomRenderer extends Renderer implements NodeFactory abstract createRootHostView(hostProtoViewRef: RenderProtoViewRef, fragmentCount: number, hostElementSelector: string): RenderViewWithFragments; - abstract createView(protoViewRef: RenderProtoViewRef, fragmentCount: number): - RenderViewWithFragments; + abstract createView(protoViewRef: RenderProtoViewRef, + fragmentCount: number): RenderViewWithFragments; abstract destroyView(viewRef: RenderViewRef); @@ -207,8 +207,8 @@ export abstract class DomRenderer extends Renderer implements NodeFactory propertyValue); } - setElementAttribute(location: RenderElementRef, attributeName: string, attributeValue: string): - void { + setElementAttribute(location: RenderElementRef, attributeName: string, + attributeValue: string): void { var view = resolveInternalDomView(location.renderView); var element = view.boundElements[location.boundElementIndex]; var dashCasedAttributeName = camelCaseToDashCase(attributeName); diff --git a/modules/angular2/src/core/testability/browser_testability.ts b/modules/angular2/src/core/testability/browser_testability.ts index 947102355f..035042ba80 100644 --- a/modules/angular2/src/core/testability/browser_testability.ts +++ b/modules/angular2/src/core/testability/browser_testability.ts @@ -28,15 +28,15 @@ export class BrowserGetTestability implements GetTestability { static init() { setTestabilityGetter(new BrowserGetTestability()); } addToWindow(registry: TestabilityRegistry): void { - global.getAngularTestability = function(elem: Element, findInAncestors: boolean = true): - PublicTestability { - var testability = registry.findTestabilityInTree(elem, findInAncestors); + global.getAngularTestability = function(elem: Element, + findInAncestors: boolean = true): PublicTestability { + var testability = registry.findTestabilityInTree(elem, findInAncestors); - if (testability == null) { - throw new Error('Could not find testability for element.'); - } - return new PublicTestability(testability); - }; + if (testability == null) { + throw new Error('Could not find testability for element.'); + } + return new PublicTestability(testability); + }; global.getAllAngularTestabilities = function(): PublicTestability[] { var testabilities = registry.getAllTestabilities(); return testabilities.map((testability) => { return new PublicTestability(testability); }); diff --git a/modules/angular2/src/core/util/decorators.ts b/modules/angular2/src/core/util/decorators.ts index 81bece6852..ad66e5ea8b 100644 --- a/modules/angular2/src/core/util/decorators.ts +++ b/modules/angular2/src/core/util/decorators.ts @@ -236,8 +236,8 @@ if (!(Reflect && Reflect.getMetadata)) { throw 'reflect-metadata shim is required when using class decorators'; } -export function makeDecorator(annotationCls, chainFn: (fn: Function) => void = null): - (...args: any[]) => (cls: any) => any { +export function makeDecorator( + annotationCls, chainFn: (fn: Function) => void = null): (...args: any[]) => (cls: any) => any { function DecoratorFactory(objOrType): (cls: any) => any { var annotationInstance = new (annotationCls)(objOrType); if (this instanceof annotationCls) { diff --git a/modules/angular2/src/http/backends/mock_backend.ts b/modules/angular2/src/http/backends/mock_backend.ts index e30eefbe05..8b4257408f 100644 --- a/modules/angular2/src/http/backends/mock_backend.ts +++ b/modules/angular2/src/http/backends/mock_backend.ts @@ -6,7 +6,7 @@ import {Connection, ConnectionBackend} from '../interfaces'; import {isPresent} from 'angular2/src/core/facade/lang'; import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions'; var Rx = require('@reactivex/rxjs/dist/cjs/Rx'); -let{Subject, ReplaySubject} = Rx; +let {Subject, ReplaySubject} = Rx; /** * diff --git a/modules/angular2/src/router/lifecycle_annotations.ts b/modules/angular2/src/router/lifecycle_annotations.ts index ff6c07b47f..4c93a0b139 100644 --- a/modules/angular2/src/router/lifecycle_annotations.ts +++ b/modules/angular2/src/router/lifecycle_annotations.ts @@ -42,6 +42,6 @@ export { * * {@example router/ts/can_activate/can_activate_example.ts region='canActivate' } */ -export var CanActivate: - (hook: (next: ComponentInstruction, prev: ComponentInstruction) => Promise| boolean) => - ClassDecorator = makeDecorator(CanActivateAnnotation); +export var CanActivate: (hook: (next: ComponentInstruction, prev: ComponentInstruction) => + Promise| boolean) => ClassDecorator = + makeDecorator(CanActivateAnnotation); diff --git a/modules/angular2/src/router/route_config_impl.ts b/modules/angular2/src/router/route_config_impl.ts index 7fc72cff62..2bdd7acee2 100644 --- a/modules/angular2/src/router/route_config_impl.ts +++ b/modules/angular2/src/router/route_config_impl.ts @@ -41,8 +41,8 @@ export class Route implements RouteDefinition { // added next two properties to work around https://github.com/Microsoft/TypeScript/issues/4107 loader: Function; redirectTo: string; - constructor({path, component, as, data}: - {path: string, component: Type, as?: string, data?: {[key: string]: any}}) { + constructor({path, component, as, + data}: {path: string, component: Type, as?: string, data?: {[key: string]: any}}) { this.path = path; this.component = component; this.as = as; @@ -115,8 +115,8 @@ export class AsyncRoute implements RouteDefinition { path: string; loader: Function; as: string; - constructor({path, loader, as, data}: - {path: string, loader: Function, as?: string, data?: {[key: string]: any}}) { + constructor({path, loader, as, + data}: {path: string, loader: Function, as?: string, data?: {[key: string]: any}}) { this.path = path; this.loader = loader; this.as = as; diff --git a/modules/angular2/src/router/router.ts b/modules/angular2/src/router/router.ts index d0a3413ce3..b157178bca 100644 --- a/modules/angular2/src/router/router.ts +++ b/modules/angular2/src/router/router.ts @@ -544,8 +544,8 @@ function splitAndFlattenLinkParams(linkParams: any[]): any[] { }, []); } -function canActivateOne(nextInstruction: Instruction, prevInstruction: Instruction): - Promise { +function canActivateOne(nextInstruction: Instruction, + prevInstruction: Instruction): Promise { var next = _resolveToTrue; if (isPresent(nextInstruction.child)) { next = canActivateOne(nextInstruction.child, diff --git a/modules/angular2/src/testing/testing.ts b/modules/angular2/src/testing/testing.ts index d8546e3d38..ce30acd8dd 100644 --- a/modules/angular2/src/testing/testing.ts +++ b/modules/angular2/src/testing/testing.ts @@ -144,22 +144,22 @@ export function beforeEach(fn: FunctionWithParamTokens | AnyTestFn): void { } } -export function it(name: string, fn: FunctionWithParamTokens | AnyTestFn, timeOut: number = null): - void { +export function it(name: string, fn: FunctionWithParamTokens | AnyTestFn, + timeOut: number = null): void { return _it(jsmIt, name, fn, timeOut); } -export function xit(name: string, fn: FunctionWithParamTokens | AnyTestFn, timeOut: number = null): - void { +export function xit(name: string, fn: FunctionWithParamTokens | AnyTestFn, + timeOut: number = null): void { return _it(jsmXIt, name, fn, timeOut); } -export function iit(name: string, fn: FunctionWithParamTokens | AnyTestFn, timeOut: number = null): - void { +export function iit(name: string, fn: FunctionWithParamTokens | AnyTestFn, + timeOut: number = null): void { return _it(jsmIIt, name, fn, timeOut); } -export function fit(name: string, fn: FunctionWithParamTokens | AnyTestFn, timeOut: number = null): - void { +export function fit(name: string, fn: FunctionWithParamTokens | AnyTestFn, + timeOut: number = null): void { return _it(jsmIIt, name, fn, timeOut); } diff --git a/modules/angular2/src/web_workers/worker/application.ts b/modules/angular2/src/web_workers/worker/application.ts index 2f31c651c5..99e5ecf94b 100644 --- a/modules/angular2/src/web_workers/worker/application.ts +++ b/modules/angular2/src/web_workers/worker/application.ts @@ -28,8 +28,8 @@ var _postMessage: PostMessageInterface = postMessage; * See the bootstrap() docs for more details. */ export function bootstrapWebWorker( - appComponentType: Type, componentInjectableProviders: Array = null): - Promise { + appComponentType: Type, + componentInjectableProviders: Array = null): Promise { Parse5DomAdapter.makeCurrent(); var sink = new PostMessageBusSink({ postMessage: (message: any, transferrables?:[ArrayBuffer]) => { diff --git a/modules/angular2/src/web_workers/worker/application_common.ts b/modules/angular2/src/web_workers/worker/application_common.ts index ab72557212..14e41ba38a 100644 --- a/modules/angular2/src/web_workers/worker/application_common.ts +++ b/modules/angular2/src/web_workers/worker/application_common.ts @@ -91,8 +91,8 @@ class PrintLogger { logGroupEnd() {} } -function webWorkerProviders(appComponentType, bus: MessageBus, initData: {[key: string]: any}): - Array { +function webWorkerProviders(appComponentType, bus: MessageBus, + initData: {[key: string]: any}): Array { return [ compilerProviders(), Serializer, @@ -114,9 +114,9 @@ function webWorkerProviders(appComponentType, bus: MessageBus, initData: {[key: ]; } -export function bootstrapWebWorkerCommon(appComponentType: Type, bus: MessageBus, - appProviders: Array = null): - Promise { +export function bootstrapWebWorkerCommon( + appComponentType: Type, bus: MessageBus, + appProviders: Array = null): Promise { var bootstrapProcess: PromiseCompleter = PromiseWrapper.completer(); var appPromise = platform().asyncApplication((zone: NgZone) => { // TODO(rado): prepopulate template cache, so applications with only diff --git a/modules/angular2/src/web_workers/worker/event_deserializer.ts b/modules/angular2/src/web_workers/worker/event_deserializer.ts index 5fee619913..5a7f42ce1a 100644 --- a/modules/angular2/src/web_workers/worker/event_deserializer.ts +++ b/modules/angular2/src/web_workers/worker/event_deserializer.ts @@ -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; } diff --git a/modules/angular2/test/core/change_detection/change_detector_config.ts b/modules/angular2/test/core/change_detection/change_detector_config.ts index 6fe181e692..8aeba561f5 100644 --- a/modules/angular2/test/core/change_detection/change_detector_config.ts +++ b/modules/angular2/test/core/change_detection/change_detector_config.ts @@ -39,8 +39,8 @@ function _createEventRecords(expression: string): BindingRecord[] { return [BindingRecord.createForEvent(ast, eventName, 0)]; } -function _createHostEventRecords(expression: string, directiveRecord: DirectiveRecord): - BindingRecord[] { +function _createHostEventRecords(expression: string, + directiveRecord: DirectiveRecord): BindingRecord[] { var parts = expression.split("="); var eventName = parts[0].substring(1, parts[0].length - 1); var exp = parts[1].substring(1, parts[1].length - 1); @@ -315,48 +315,46 @@ class _DirectiveUpdating { * Map from test id to _DirectiveUpdating. * Definitions in this map define definitions which allow testing directive updating. */ - static availableDefinitions: - {[key: string]: _DirectiveUpdating} = { - 'directNoDispatcher': new _DirectiveUpdating( - [_DirectiveUpdating.updateA('42', _DirectiveUpdating.basicRecords[0])], + static availableDefinitions: {[key: string]: _DirectiveUpdating} = { + 'directNoDispatcher': new _DirectiveUpdating( + [_DirectiveUpdating.updateA('42', _DirectiveUpdating.basicRecords[0])], + [_DirectiveUpdating.basicRecords[0]]), + 'groupChanges': + new _DirectiveUpdating( + [ + _DirectiveUpdating.updateA('1', _DirectiveUpdating.basicRecords[0]), + _DirectiveUpdating.updateB('2', _DirectiveUpdating.basicRecords[0]), + BindingRecord.createDirectiveOnChanges(_DirectiveUpdating.basicRecords[0]), + _DirectiveUpdating.updateA('3', _DirectiveUpdating.basicRecords[1]), + BindingRecord.createDirectiveOnChanges(_DirectiveUpdating.basicRecords[1]) + ], + [_DirectiveUpdating.basicRecords[0], _DirectiveUpdating.basicRecords[1]]), + 'directiveDoCheck': new _DirectiveUpdating( + [BindingRecord.createDirectiveDoCheck(_DirectiveUpdating.basicRecords[0])], + [_DirectiveUpdating.basicRecords[0]]), + 'directiveOnInit': new _DirectiveUpdating( + [BindingRecord.createDirectiveOnInit(_DirectiveUpdating.basicRecords[0])], + [_DirectiveUpdating.basicRecords[0]]), + 'emptyWithDirectiveRecords': new _DirectiveUpdating( + [], [_DirectiveUpdating.basicRecords[0], _DirectiveUpdating.basicRecords[1]]), + 'noCallbacks': new _DirectiveUpdating( + [_DirectiveUpdating.updateA('1', _DirectiveUpdating.recordNoCallbacks)], + [_DirectiveUpdating.recordNoCallbacks]), + 'readingDirectives': + new _DirectiveUpdating( + [ + BindingRecord.createForHostProperty( + new DirectiveIndex(0, 0), _getParser().parseBinding('a', 'location'), PROP_NAME) + ], [_DirectiveUpdating.basicRecords[0]]), - 'groupChanges': - new _DirectiveUpdating( - [ - _DirectiveUpdating.updateA('1', _DirectiveUpdating.basicRecords[0]), - _DirectiveUpdating.updateB('2', _DirectiveUpdating.basicRecords[0]), - BindingRecord.createDirectiveOnChanges(_DirectiveUpdating.basicRecords[0]), - _DirectiveUpdating.updateA('3', _DirectiveUpdating.basicRecords[1]), - BindingRecord.createDirectiveOnChanges(_DirectiveUpdating.basicRecords[1]) - ], - [_DirectiveUpdating.basicRecords[0], _DirectiveUpdating.basicRecords[1]]), - 'directiveDoCheck': new _DirectiveUpdating( - [BindingRecord.createDirectiveDoCheck(_DirectiveUpdating.basicRecords[0])], - [_DirectiveUpdating.basicRecords[0]]), - 'directiveOnInit': new _DirectiveUpdating( - [BindingRecord.createDirectiveOnInit(_DirectiveUpdating.basicRecords[0])], - [_DirectiveUpdating.basicRecords[0]]), - 'emptyWithDirectiveRecords': new _DirectiveUpdating( - [], [_DirectiveUpdating.basicRecords[0], _DirectiveUpdating.basicRecords[1]]), - 'noCallbacks': new _DirectiveUpdating( - [_DirectiveUpdating.updateA('1', _DirectiveUpdating.recordNoCallbacks)], - [_DirectiveUpdating.recordNoCallbacks]), - 'readingDirectives': - new _DirectiveUpdating( - [ - BindingRecord.createForHostProperty(new DirectiveIndex(0, 0), - _getParser().parseBinding('a', 'location'), - PROP_NAME) - ], - [_DirectiveUpdating.basicRecords[0]]), - 'interpolation': - new _DirectiveUpdating( - [ - BindingRecord.createForElementProperty( - _getParser().parseInterpolation('B{{a}}A', 'location'), 0, PROP_NAME) - ], - []) - }; + 'interpolation': + new _DirectiveUpdating( + [ + BindingRecord.createForElementProperty( + _getParser().parseInterpolation('B{{a}}A', 'location'), 0, PROP_NAME) + ], + []) + }; } /** diff --git a/modules/angular2/test/core/change_detection/proto_record_spec.ts b/modules/angular2/test/core/change_detection/proto_record_spec.ts index bdc76ade3c..39cbc86bd4 100644 --- a/modules/angular2/test/core/change_detection/proto_record_spec.ts +++ b/modules/angular2/test/core/change_detection/proto_record_spec.ts @@ -13,15 +13,15 @@ import {isBlank} from 'angular2/src/core/facade/lang'; import {RecordType, ProtoRecord} from 'angular2/src/core/change_detection/proto_record'; export function main() { - function r({lastInBinding, mode, name, directiveIndex, argumentToPureFunction, referencedBySelf}: - { - lastInBinding?: any, - mode?: any, - name?: any, - directiveIndex?: any, - argumentToPureFunction?: boolean, - referencedBySelf?: boolean - } = {}) { + function r( + {lastInBinding, mode, name, directiveIndex, argumentToPureFunction, referencedBySelf}: { + lastInBinding?: any, + mode?: any, + name?: any, + directiveIndex?: any, + argumentToPureFunction?: boolean, + referencedBySelf?: boolean + } = {}) { if (isBlank(lastInBinding)) lastInBinding = false; if (isBlank(mode)) mode = RecordType.PropertyRead; if (isBlank(name)) name = "name"; diff --git a/modules/angular2/test/core/compiler/change_detector_compiler_spec.ts b/modules/angular2/test/core/compiler/change_detector_compiler_spec.ts index 16235c7f0b..bf3632e08d 100644 --- a/modules/angular2/test/core/compiler/change_detector_compiler_spec.ts +++ b/modules/angular2/test/core/compiler/change_detector_compiler_spec.ts @@ -108,9 +108,9 @@ export function main() { }); describe('compileComponentCodeGen', () => { - function detectChanges(compiler: ChangeDetectionCompiler, template: string, - directives: CompileDirectiveMetadata[] = CONST_EXPR([])): - Promise { + function detectChanges( + compiler: ChangeDetectionCompiler, template: string, + directives: CompileDirectiveMetadata[] = CONST_EXPR([])): Promise { var type = new CompileTypeMetadata({name: stringify(SomeComponent), moduleUrl: THIS_MODULE_URL}); var parsedTemplate = parser.parse(template, directives, 'TestComp'); @@ -133,8 +133,8 @@ export function main() { }); } -function createTestableModule(source: SourceExpressions, changeDetectorIndex: number): - SourceModule { +function createTestableModule(source: SourceExpressions, + changeDetectorIndex: number): SourceModule { var resultExpression = `${THIS_MODULE_REF}testChangeDetector(([${source.expressions.join(',')}])[${changeDetectorIndex}])`; var testableSource = `${source.declarations.join('\n')} diff --git a/modules/angular2/test/core/compiler/command_compiler_spec.ts b/modules/angular2/test/core/compiler/command_compiler_spec.ts index ba99dda841..8173b2ab13 100644 --- a/modules/angular2/test/core/compiler/command_compiler_spec.ts +++ b/modules/angular2/test/core/compiler/command_compiler_spec.ts @@ -120,8 +120,8 @@ export function main() { }); } - function createDirective(type: CompileTypeMetadata, selector: string, exportAs: string = null): - CompileDirectiveMetadata { + function createDirective(type: CompileTypeMetadata, selector: string, + exportAs: string = null): CompileDirectiveMetadata { return CompileDirectiveMetadata.create( {selector: selector, exportAs: exportAs, isComponent: false, type: type}); } diff --git a/modules/angular2/test/core/compiler/directive_metadata_spec.ts b/modules/angular2/test/core/compiler/directive_metadata_spec.ts index 8248b3bd86..3d333e6a8f 100644 --- a/modules/angular2/test/core/compiler/directive_metadata_spec.ts +++ b/modules/angular2/test/core/compiler/directive_metadata_spec.ts @@ -42,7 +42,8 @@ export function main() { selector: 'someSelector', isComponent: true, dynamicLoadable: true, - type: fullTypeMeta, template: fullTemplateMeta, + type: fullTypeMeta, + template: fullTemplateMeta, changeDetection: ChangeDetectionStrategy.Default, inputs: ['someProp'], outputs: ['someEvent'], diff --git a/modules/angular2/test/core/compiler/style_compiler_spec.ts b/modules/angular2/test/core/compiler/style_compiler_spec.ts index 6dd595ddd6..f37170c5a9 100644 --- a/modules/angular2/test/core/compiler/style_compiler_spec.ts +++ b/modules/angular2/test/core/compiler/style_compiler_spec.ts @@ -74,8 +74,8 @@ export function main() { `a {color: green}@import ${IMPORT_REL_STYLESHEET_URL};`; }); - function compile(styles: string[], styleAbsUrls: string[], encapsulation: ViewEncapsulation): - Promise { + function compile(styles: string[], styleAbsUrls: string[], + encapsulation: ViewEncapsulation): Promise { // Note: Can't use MockXHR as the xhr is called recursively, // so we can't trigger flush. xhr.spy('get').andCallFake((url) => { @@ -203,8 +203,8 @@ export function main() { }); describe('compileComponentCodeGen', () => { - function compile(styles: string[], styleAbsUrls: string[], encapsulation: ViewEncapsulation): - Promise { + function compile(styles: string[], styleAbsUrls: string[], + encapsulation: ViewEncapsulation): Promise { var sourceExpression = compiler.compileComponentCodeGen( `'${appId}'`, `${templateId}`, new CompileTemplateMetadata( diff --git a/modules/angular2/test/core/compiler/template_compiler_spec.ts b/modules/angular2/test/core/compiler/template_compiler_spec.ts index 08f6b2f61d..59a6b71b3b 100644 --- a/modules/angular2/test/core/compiler/template_compiler_spec.ts +++ b/modules/angular2/test/core/compiler/template_compiler_spec.ts @@ -190,8 +190,8 @@ export function main() { }); describe('compileTemplatesCodeGen', () => { - function normalizeComponent(component: Type): - Promise { + function normalizeComponent( + component: Type): Promise { var compAndViewDirMetas = [runtimeMetadataResolver.getMetadata(component)].concat( runtimeMetadataResolver.getViewDirectivesMetadata(component)); return PromiseWrapper.all(compAndViewDirMetas.map( @@ -316,8 +316,8 @@ class CompWithEmbeddedTemplate { class NonComponent { } -function testableTemplateModule(sourceModule: SourceModule, normComp: CompileDirectiveMetadata): - SourceModule { +function testableTemplateModule(sourceModule: SourceModule, + normComp: CompileDirectiveMetadata): SourceModule { var resultExpression = `${THIS_MODULE_REF}humanizeTemplate(Host${normComp.type.name}Template.getTemplate())`; var testableSource = `${sourceModule.sourceWithModuleRefs} @@ -332,9 +332,9 @@ function testableStylesModule(sourceModule: SourceModule): SourceModule { } // Attention: read by eval! -export function humanizeTemplate(template: CompiledTemplate, - humanizedTemplates: Map = null): - {[key: string]: any} { +export function humanizeTemplate( + template: CompiledTemplate, + humanizedTemplates: Map = null): {[key: string]: any} { if (isBlank(humanizedTemplates)) { humanizedTemplates = new Map(); } diff --git a/modules/angular2/test/core/compiler/template_parser_spec.ts b/modules/angular2/test/core/compiler/template_parser_spec.ts index f00d9ebcc5..2db9f1aece 100644 --- a/modules/angular2/test/core/compiler/template_parser_spec.ts +++ b/modules/angular2/test/core/compiler/template_parser_spec.ts @@ -553,7 +553,8 @@ There is no directive with "exportAs" set to "dirA" at TestComp > div:nth-child( selector: '[a]', isComponent: true, type: new CompileTypeMetadata({name: 'DirA'}), - exportAs: 'dirA', template: new CompileTemplateMetadata({ngContentSelectors: []}) + exportAs: 'dirA', + template: new CompileTemplateMetadata({ngContentSelectors: []}) }); expect(humanizeTemplateAsts(parse('
', [dirA]))) .toEqual([ @@ -686,8 +687,8 @@ There is no directive with "exportAs" set to "dirA" at TestComp > div:nth-child( }); describe('content projection', () => { - function createComp(selector: string, ngContentSelectors: string[]): - CompileDirectiveMetadata { + function createComp(selector: string, + ngContentSelectors: string[]): CompileDirectiveMetadata { return CompileDirectiveMetadata.create({ selector: selector, isComponent: true, diff --git a/modules/angular2/test/core/debug/debug_element_spec.ts b/modules/angular2/test/core/debug/debug_element_spec.ts index 42e76c8d12..0c331ac3fe 100644 --- a/modules/angular2/test/core/debug/debug_element_spec.ts +++ b/modules/angular2/test/core/debug/debug_element_spec.ts @@ -52,7 +52,7 @@ class MessageDir { Child `, - directives: [MessageDir] + directives: [MessageDir], }) @Injectable() class ChildComp { @@ -64,7 +64,7 @@ class ChildComp { @Component({selector: 'cond-content-comp', viewProviders: [Logger]}) @View({ template: `
`, - directives: [NgIf, MessageDir] + directives: [NgIf, MessageDir], }) @Injectable() class ConditionalContentComp { @@ -78,7 +78,7 @@ class ConditionalContentComp { `, - directives: [ChildComp, MessageDir, ConditionalContentComp] + directives: [ChildComp, MessageDir, ConditionalContentComp], }) @Injectable() class ParentComp { @@ -98,7 +98,7 @@ class CustomEmitter { @View({ template: ` `, - directives: [CustomEmitter] + directives: [CustomEmitter], }) @Injectable() class EventsComp { @@ -121,7 +121,7 @@ class EventsComp {
`, - directives: [NgFor, MessageDir] + directives: [NgFor, MessageDir], }) @Injectable() class UsingFor { diff --git a/modules/angular2/test/core/forms/integration_spec.ts b/modules/angular2/test/core/forms/integration_spec.ts index 8a4bd4e84e..36a6555310 100644 --- a/modules/angular2/test/core/forms/integration_spec.ts +++ b/modules/angular2/test/core/forms/integration_spec.ts @@ -78,27 +78,29 @@ export function main() { })); it("should emit ng-submit event on submit", - inject( - [TestComponentBuilder], fakeAsync((tcb: TestComponentBuilder) => { - var t = - `
{{name}}
`; + inject([TestComponentBuilder], fakeAsync((tcb: TestComponentBuilder) => { + var t = `
+
+ {{name}} +
`; - var rootTC: RootTestComponent; + var rootTC: RootTestComponent; - tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((root) => { rootTC = root; }); - tick(); + tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then( + (root) => { rootTC = root; }); + tick(); - rootTC.debugElement.componentInstance.form = new ControlGroup({}); - rootTC.debugElement.componentInstance.name = 'old'; + rootTC.debugElement.componentInstance.form = new ControlGroup({}); + rootTC.debugElement.componentInstance.name = 'old'; - tick(); + tick(); - var form = rootTC.debugElement.query(By.css("form")); - dispatchEvent(form.nativeElement, "submit"); + var form = rootTC.debugElement.query(By.css("form")); + dispatchEvent(form.nativeElement, "submit"); - tick(); - expect(rootTC.debugElement.componentInstance.name).toEqual('updated'); - }))); + tick(); + expect(rootTC.debugElement.componentInstance.name).toEqual('updated'); + }))); it("should work with single controls", inject([TestComponentBuilder, AsyncTestCompleter], (tcb: TestComponentBuilder, async) => { diff --git a/modules/angular2/test/core/forward_ref_integration_spec.ts b/modules/angular2/test/core/forward_ref_integration_spec.ts index 936cede234..a11f3eee4c 100644 --- a/modules/angular2/test/core/forward_ref_integration_spec.ts +++ b/modules/angular2/test/core/forward_ref_integration_spec.ts @@ -43,7 +43,7 @@ export function main() { @Component({selector: 'app', viewProviders: [forwardRef(() => Frame)]}) @View({ template: ``, - directives: [forwardRef(() => Door), forwardRef(() => Lock)] + directives: [forwardRef(() => Door), forwardRef(() => Lock)], }) class App { } @@ -51,7 +51,7 @@ class App { @Component({selector: 'Lock'}) @View({ directives: [NgFor], - template: `{{frame.name}}({{lock.name}})` + template: `{{frame.name}}({{lock.name}})`, }) class Door { locks: QueryList; diff --git a/modules/angular2/test/core/linker/integration_spec.ts b/modules/angular2/test/core/linker/integration_spec.ts index cbb7553151..383dcc8ed5 100644 --- a/modules/angular2/test/core/linker/integration_spec.ts +++ b/modules/angular2/test/core/linker/integration_spec.ts @@ -2321,7 +2321,8 @@ class DirectiveThrowingAnError { @Component({ selector: 'component-with-template', - directives: [NgFor], template: `No View Decorator:
{{item}}
` + directives: [NgFor], + template: `No View Decorator:
{{item}}
` }) class ComponentWithTemplate { items = [1, 2, 3]; diff --git a/modules/angular2/test/core/linker/projection_integration_spec.ts b/modules/angular2/test/core/linker/projection_integration_spec.ts index bd65ddc201..cb7a3aa8d5 100644 --- a/modules/angular2/test/core/linker/projection_integration_spec.ts +++ b/modules/angular2/test/core/linker/projection_integration_spec.ts @@ -470,32 +470,32 @@ export function main() { it('should allow to switch the order of nested components via ng-content', inject([TestComponentBuilder, AsyncTestCompleter], (tcb: TestComponentBuilder, async) => { - tcb.overrideView( - MainComp, - new ViewMetadata( - {template: ``, directives: [CmpA, CmpB]})) + tcb.overrideView(MainComp, new ViewMetadata({ + template: ``, + directives: [CmpA, CmpB], + })) .createAsync(MainComp) .then((main) => { main.detectChanges(); expect(DOM.getInnerHTML(main.debugElement.nativeElement)) - .toEqual( - 'cmp-dcmp-c'); + .toEqual('cmp-d' + + 'cmp-c'); async.done(); }); })); it('should create nested components in the right order', inject([TestComponentBuilder, AsyncTestCompleter], (tcb: TestComponentBuilder, async) => { - tcb.overrideView( - MainComp, - new ViewMetadata( - {template: ``, directives: [CmpA1, CmpA2]})) + tcb.overrideView(MainComp, new ViewMetadata({ + template: ``, + directives: [CmpA1, CmpA2], + })) .createAsync(MainComp) .then((main) => { main.detectChanges(); expect(DOM.getInnerHTML(main.debugElement.nativeElement)) - .toEqual( - 'a1b11b12a2b21b22'); + .toEqual('a1b11b12' + + 'a2b21b22'); async.done(); }); })); diff --git a/modules/angular2/test/http/http_spec.ts b/modules/angular2/test/http/http_spec.ts index 3238599f03..a227b4cbe8 100644 --- a/modules/angular2/test/http/http_spec.ts +++ b/modules/angular2/test/http/http_spec.ts @@ -31,7 +31,7 @@ import { } from 'angular2/http'; var Rx = require('@reactivex/rxjs/dist/cjs/Rx'); -let{Observable, Subject} = Rx; +let {Observable, Subject} = Rx; class SpyObserver extends SpyObject { onNext: Function; diff --git a/modules/angular2/test/router/integration/navigation_spec.ts b/modules/angular2/test/router/integration/navigation_spec.ts index 439ea4fe09..0b741224b2 100644 --- a/modules/angular2/test/router/integration/navigation_spec.ts +++ b/modules/angular2/test/router/integration/navigation_spec.ts @@ -288,16 +288,24 @@ function parentLoader() { } @Component({selector: 'parent-cmp'}) -@View({template: "inner { }", directives: [RouterOutlet]}) -@RouteConfig( - [new Route({path: '/b', component: HelloCmp}), new Route({path: '/', component: HelloCmp})]) +@View({ + template: "inner { }", + directives: [RouterOutlet], +}) +@RouteConfig([ + new Route({path: '/b', component: HelloCmp}), + new Route({path: '/', component: HelloCmp}), +]) class ParentCmp { constructor() {} } @Component({selector: 'team-cmp'}) -@View({template: "team {{id}} { }", directives: [RouterOutlet]}) +@View({ + template: "team {{id}} { }", + directives: [RouterOutlet], +}) @RouteConfig([new Route({path: '/user/:name', component: UserCmp})]) class TeamCmp { id: string; @@ -320,13 +328,13 @@ class ModalCmp { @Component({selector: 'aux-cmp'}) @View({ - template: - `main {} | aux {}`, - directives: [RouterOutlet] + template: 'main {} | ' + + 'aux {}', + directives: [RouterOutlet], }) @RouteConfig([ new Route({path: '/hello', component: HelloCmp}), - new AuxRoute({path: '/modal', component: ModalCmp}) + new AuxRoute({path: '/modal', component: ModalCmp}), ]) class AuxCmp { } diff --git a/modules/benchmarks/src/static_tree/tree_benchmark.ts b/modules/benchmarks/src/static_tree/tree_benchmark.ts index 56b4c4595a..35aedbe511 100644 --- a/modules/benchmarks/src/static_tree/tree_benchmark.ts +++ b/modules/benchmarks/src/static_tree/tree_benchmark.ts @@ -235,8 +235,7 @@ class StaticTreeComponent0 extends StaticTreeComponentBase { @Component({selector: 'tree', inputs: ['data']}) @View({ directives: [StaticTreeComponent0], - template: - ` {{data.value}} ` + template: ` {{data.value}} ` }) class StaticTreeComponent1 extends StaticTreeComponentBase { } @@ -244,8 +243,7 @@ class StaticTreeComponent1 extends StaticTreeComponentBase { @Component({selector: 'tree', inputs: ['data']}) @View({ directives: [StaticTreeComponent1], - template: - ` {{data.value}} ` + template: ` {{data.value}} ` }) class StaticTreeComponent2 extends StaticTreeComponentBase { data: TreeNode; @@ -254,8 +252,7 @@ class StaticTreeComponent2 extends StaticTreeComponentBase { @Component({selector: 'tree', inputs: ['data']}) @View({ directives: [StaticTreeComponent2], - template: - ` {{data.value}} ` + template: ` {{data.value}} ` }) class StaticTreeComponent3 extends StaticTreeComponentBase { } @@ -263,8 +260,7 @@ class StaticTreeComponent3 extends StaticTreeComponentBase { @Component({selector: 'tree', inputs: ['data']}) @View({ directives: [StaticTreeComponent3], - template: - ` {{data.value}} ` + template: ` {{data.value}} ` }) class StaticTreeComponent4 extends StaticTreeComponentBase { } @@ -272,8 +268,7 @@ class StaticTreeComponent4 extends StaticTreeComponentBase { @Component({selector: 'tree', inputs: ['data']}) @View({ directives: [StaticTreeComponent4], - template: - ` {{data.value}} ` + template: ` {{data.value}} ` }) class StaticTreeComponent5 extends StaticTreeComponentBase { } @@ -281,8 +276,7 @@ class StaticTreeComponent5 extends StaticTreeComponentBase { @Component({selector: 'tree', inputs: ['data']}) @View({ directives: [StaticTreeComponent5], - template: - ` {{data.value}} ` + template: ` {{data.value}} ` }) class StaticTreeComponent6 extends StaticTreeComponentBase { } @@ -290,8 +284,7 @@ class StaticTreeComponent6 extends StaticTreeComponentBase { @Component({selector: 'tree', inputs: ['data']}) @View({ directives: [StaticTreeComponent6], - template: - ` {{data.value}} ` + template: ` {{data.value}} ` }) class StaticTreeComponent7 extends StaticTreeComponentBase { } @@ -299,8 +292,7 @@ class StaticTreeComponent7 extends StaticTreeComponentBase { @Component({selector: 'tree', inputs: ['data']}) @View({ directives: [StaticTreeComponent7], - template: - ` {{data.value}} ` + template: ` {{data.value}} ` }) class StaticTreeComponent8 extends StaticTreeComponentBase { } @@ -308,8 +300,7 @@ class StaticTreeComponent8 extends StaticTreeComponentBase { @Component({selector: 'tree', inputs: ['data']}) @View({ directives: [StaticTreeComponent8], - template: - ` {{data.value}} ` + template: ` {{data.value}} ` }) class StaticTreeComponent9 extends StaticTreeComponentBase { } diff --git a/modules/benchmarks_external/src/static_tree/tree_benchmark.ts b/modules/benchmarks_external/src/static_tree/tree_benchmark.ts index 11cb706094..10c3474f06 100644 --- a/modules/benchmarks_external/src/static_tree/tree_benchmark.ts +++ b/modules/benchmarks_external/src/static_tree/tree_benchmark.ts @@ -13,8 +13,7 @@ function addTreeDirective(module, level: number) { if (level <= 0) { template = ` {{data.value}}` } else { - template = - ` {{data.value}} `; + template = ` {{data.value}} `; } module.directive(`tree${level}`, function() { return {scope: {data: '='}, template: template}; }); } diff --git a/modules/benchpress/src/webdriver/chrome_driver_extension.ts b/modules/benchpress/src/webdriver/chrome_driver_extension.ts index f1b9c4a1ed..90b45c902e 100644 --- a/modules/benchpress/src/webdriver/chrome_driver_extension.ts +++ b/modules/benchpress/src/webdriver/chrome_driver_extension.ts @@ -220,8 +220,8 @@ export class ChromeDriverExtension extends WebDriverExtension { } } -function normalizeEvent(chromeEvent: {[key: string]: any}, data: {[key: string]: any}): - {[key: string]: any} { +function normalizeEvent(chromeEvent: {[key: string]: any}, + data: {[key: string]: any}): {[key: string]: any} { var ph = chromeEvent['ph']; if (StringWrapper.equals(ph, 'S')) { ph = 'b'; diff --git a/modules/upgrade/test/integration_spec.ts b/modules/upgrade/test/integration_spec.ts index 2fdfe813d6..256228cec9 100644 --- a/modules/upgrade/test/integration_spec.ts +++ b/modules/upgrade/test/integration_spec.ts @@ -372,7 +372,8 @@ export function main() { var ng1 = function() { return { scope: {title: '@'}, - bindToController: true, template: '{{ctl.title}}', + bindToController: true, + template: '{{ctl.title}}', controllerAs: 'ctl', controller: Class({constructor: function() {}}) }; @@ -400,7 +401,8 @@ export function main() { var ng1 = function($rootScope) { return { scope: {title: '@'}, - bindToController: true, template: '{{ctl.status}}', + bindToController: true, + template: '{{ctl.status}}', require: 'ng1', controller: Class({constructor: function() { this.status = 'WORKS'; }}), link: function(scope, element, attrs, linkController) { @@ -437,7 +439,8 @@ export function main() { var ng1 = function() { return { scope: {title: '@'}, - bindToController: true, template: '{{parent.parent}}:{{ng1.status}}', + bindToController: true, + template: '{{parent.parent}}:{{ng1.status}}', require: ['ng1', '^parent', '?^^notFound'], controller: Class({constructor: function() { this.status = 'WORKS'; }}), link: function(scope, element, attrs, linkControllers) { @@ -510,7 +513,8 @@ export function main() { module.directive('ng1', function() { return { scope: {title: '='}, - transclude: true, template: 'ng1[Hello {{title}}!]()' + transclude: true, + template: 'ng1[Hello {{title}}!]()' }; }); diff --git a/tools/broccoli/broccoli-lodash.ts b/tools/broccoli/broccoli-lodash.ts index 849792f9dd..76388c2aaf 100644 --- a/tools/broccoli/broccoli-lodash.ts +++ b/tools/broccoli/broccoli-lodash.ts @@ -27,7 +27,7 @@ export class LodashRenderer implements DiffingBroccoliPlugin { private options: LodashRendererOptions = kDefaultOptions) {} rebuild(treeDiff: DiffResult) { - let{encoding = 'utf-8', context = {}} = this.options; + let {encoding = 'utf-8', context = {}} = this.options; let processFile = (relativePath) => { let sourceFilePath = path.join(this.inputPath, relativePath); let destFilePath = path.join(this.cachePath, relativePath); diff --git a/tools/broccoli/broccoli-typescript.ts b/tools/broccoli/broccoli-typescript.ts index ebc353a5b1..06d6089f6d 100644 --- a/tools/broccoli/broccoli-typescript.ts +++ b/tools/broccoli/broccoli-typescript.ts @@ -124,7 +124,7 @@ class DiffingTSCompiler implements DiffingBroccoliPlugin { allDiagnostics.forEach(diagnostic => { let message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n"); if (diagnostic.file) { - let{line, character} = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start); + let {line, character} = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start); errors.push(` ${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`); } else { errors.push(` Error: ${message}`);